Author Topic: How Do I Associate A File Type With A Program?  (Read 3660 times)

g333

  • Full Member
  • ***
  • Posts: 196
    • View Profile
How Do I Associate A File Type With A Program?
« on: April 19, 2005, 10:19:03 pm »
How do I associate a file type with a program?
 
SL-C3000, Sharp ROM 1.11 JP, AirEdge AH-S405C...

euroclie

  • Full Member
  • ***
  • Posts: 205
    • View Profile
    • http://
How Do I Associate A File Type With A Program?
« Reply #1 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!
« Last Edit: April 19, 2005, 11:28:38 pm by euroclie »
Patrick

zenyatta

  • Sr. Member
  • ****
  • Posts: 366
    • View Profile
    • http://
How Do I Associate A File Type With A Program?
« Reply #2 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.
SL-5500, 256MB Kingston CF card, 128MB EDGE SD card, Thomson HED-155 headphones
OpenZaurus 3.5.3 / Opie (kernel 64-0)