OESF Portables Forum

Everything Else => General Support and Discussion => Zaurus General Forums => Archived Forums => Software => Topic started by: g333 on April 19, 2005, 10:19:03 pm

Title: How Do I Associate A File Type With A Program?
Post by: g333 on April 19, 2005, 10:19:03 pm
How do I associate a file type with a program?
 
Title: How Do I Associate A File Type With A Program?
Post by: euroclie on April 19, 2005, 11:27:27 pm
The /home/QtPalmtop/etc/mime.types file contains the list of the file types recognized by the Zaurus. The /home/QtPalmtop/etc/slmime.types file contains the directories where the Zaurus will save a specific file type. Changing those files (and restarting Qtopia) can help to achieve what you're looking for...

In the .desktop file associated with your application, you'll find the mime type with which the application is associated.

Say, for instance, that you want to open .pdb plucker files with Opie Reader.

Its .desktop is /home/QtPalmtop/apps/Applications/uqtreader.desktop (or something like this, depending how/where you installed it).

In this file we find the line:

MimeType=etext/*

so if we modify the /home/QtPalmtop/etc/mime.types file to add one line like this:

etext/plucker                       pdb

and then reboot the zaurus, the .pdb plucker files are shown with the appropriate (Opie Reader) icon, and tapping on such files automatically launches Opie Reader with that document opened...

Hope this helps!

PS: Maybe there's a quicker or more efficient/elegant way... The same question has been somewhat bothering me for a while, so when I saw your post I decided to have a quick look at this, and that's what I could gather so far... Any hint / correction / addition welcomed!
Title: How Do I Associate A File Type With A Program?
Post by: zenyatta on April 20, 2005, 04:47:12 am
Google for "qtopia-addmimetype" - it is a script that does this automatically. As far as I know it isn't installed in any ROM by default. So if you find it on the Net, copy it to your Z and try running it (presumably it will tell you what parameters it needs).

Hope this helps,
z.