Author Topic: Please Help With .desktop, Mime, Applications, Etc  (Read 3358 times)

ksignorini

  • Full Member
  • ***
  • Posts: 117
    • View Profile
Please Help With .desktop, Mime, Applications, Etc
« on: January 29, 2005, 09:15:20 pm »
Here's the situation:

I have a file called MyZSafe (no extension) that is my ZSafe saved database.  I would like it to open up in ZSafe from the Doctab when I tap on it.  Of course, when I tap on it (it's icon is a ?) I get a message that OZ does not know what to do with a document of type application/octet-stream.

Fair enough.  Obviously there is some connection not made.  So after reading posts about mime types and .desktop files I thought I would try something.  First, note, that there is currently no .desktop file in the directory with my MyZSafe file.

So here's what I did:  I opened /etc/mime.types in vi and added the line:  application/zsafe zsafe to the beginning of the file.  Then I renamed my MyZSafe file to MyZSafe.zsafe

Sure enough, after restarting Opie I get the MyZSafe icon in the Doctab to have a ZSafe icon and when I tap it it opens in ZSafe.  But (and this is what sucks) as soon as I do that I get a second MyZSafe icon in the Doctab and sure enough, a MyZSafe.desktop file has been created in the directory that holds the MyZSafe file.

So, what I would like to know is:

1.  How do I fix my scenario?  (I would like only one icon for the MyZSafe file in the Doctab and I would like it to open in ZSafe when I tap it.)

2.  Where can I read about exactly how these .desktop files and mime.types all work?  

3.  (And further to #2, I noticed that a .desktop file for an application icon and one for a document icon are structured differently.  Is there info on exactly what goes into each type of .desktop file somwhere?)

Thanks everyone.

Kent!

systemparadox

  • Full Member
  • ***
  • Posts: 211
    • View Profile
    • http://www.systemparadox.co.uk
Please Help With .desktop, Mime, Applications, Etc
« Reply #1 on: February 01, 2005, 10:20:51 am »
I have the same problem with duplicate doctab entries- it seems to be one of the many inherrent issues with the way the doctab works. We're still waiting for a total rework of it.
The best way of getting the info for each .desktop file seems to be to check out an existing one and copy that. If there is any real documentation for this I would love to know about it.
My Site: The System Paradox (http://www.systemparadox.co.uk)

FOR SALE: Zaurus SL-C750: /Symbol Spectrum24 CF WiFi/Pilot Pentopia extending stylus (worth every penny)/Currently running Cacko.

Sniffer

  • Newbie
  • *
  • Posts: 34
    • View Profile
Please Help With .desktop, Mime, Applications, Etc
« Reply #2 on: February 01, 2005, 10:59:33 am »
This article describes how to build an ipk and create desktop files etc. might be some help to you.

ksignorini

  • Full Member
  • ***
  • Posts: 117
    • View Profile
Please Help With .desktop, Mime, Applications, Etc
« Reply #3 on: February 01, 2005, 11:29:38 am »
Unfortunately, this article is not very informative (it basically only shows what a .desktop file looks like).

I am really looking for some more detailed info:

What is a .desktop file?  What program (the launcher, each app, what?) accesses and uses that file?  How does it play with mime.types, etc., etc., etc.

This info has to exist somewhere.  I have to imagine that any developer knows how these actually work.  Perhaps one of them could offer up the info.  It would be most appreciated.

Thanks again,
Kent!
« Last Edit: February 01, 2005, 11:30:30 am by ksignorini »

radioz

  • Full Member
  • ***
  • Posts: 102
    • View Profile
Please Help With .desktop, Mime, Applications, Etc
« Reply #4 on: February 01, 2005, 04:06:28 pm »
Great thread ksignorini. Id like to know how this all works too.

Any gurus out there willing to help out?

radioz
5600 PXA-255
Hentges OZ 3.5.4.2
PQI 1G SD
PQI 256M SD
Socket LP 10/100 Ethernet
Ambicom WL1100C Wifi

ksignorini

  • Full Member
  • ***
  • Posts: 117
    • View Profile
Please Help With .desktop, Mime, Applications, Etc
« Reply #5 on: February 03, 2005, 04:18:01 pm »
...bump...

(sorry)

acpkendo

  • Full Member
  • ***
  • Posts: 169
    • View Profile
    • http://
Please Help With .desktop, Mime, Applications, Etc
« Reply #6 on: February 03, 2005, 05:31:58 pm »
Well, looking in the file system for suspicious files (like ~/Settings/Launcher.conf, ~/Settings/Launchersettings.conf, and /opt/QtPalmtop/etc/*), I'm not seeing anything that looks like it controls .desktop files.  Personally, I could do without them for files (as opposed to applications, for which they provide a convenient way of launching).

Actually, I hate them.  Hate, hate, hate them (Opie developers, please don't take this the wrong way. . . I'm not a C++ programmer, and so I can't submit a patch, and so I really don't have the right to complain--you guys are doing a great job).  They are the only reason I don't use the DocTab.  I didn't like the DocTab in the original Sharp ROM, but with the combination of the Medium Mount setting, I could see how this would be useful.  Regardless, I can't use it because everything is duplicated (more than once sometimes) because of the .desktop files.  I wonder if this is a compile-time setting that could be changed in the next build. . .