Desktop file format
 Maemo 5 - Fremantle
application.desktop files are read from directory:
application.desktop files consist of at least one
Desktop Entry group, containing at least the fields
Maemo application.desktop files conform with the freedesktop.org desktop entry spec version 1.0.
These files are parsed by a number of different modules in Maemo: hildon-desktop reads them to display icons in the main application menu, and launch applications. libhildonmime reads the files to launch applications associated with a specific mime type.
widget.desktop files are read from directory:
They determine which widgets can get added to desktop(s)
 Standard keys
Maemo recognises and parses a subset of all of the standard keys defined in the desktop spec. The following keys have a specific meaning in Maemo:
| ||string||Possible values are "Application", "Link" or "Directory". Only "Application" and "Directory" are parsed on Maemo.||Y|
| ||string||The name of the Desktop Entry group - should be unique on the system||Y|
| ||string||Icon to display in file manager, menus, etc. If the name is an absolute path, the given file will be used. If the name is not an absolute path, the algorithm described in the Icon Theme Specification will be used to locate the icon.||N|
| ||string||Tooltip for the icon. Unused in touch interface.||N|
| ||boolean|| If this is set to ||N|
| ||string||The absolute path to the executable to be run when the desktop entry is selected.||N|
| ||string||This field is not used by hildon-desktop, but is used by 3rd party applications such as Catorise||N|
| ||string||Parsed by libhildonmime, this field relates the mime type of a file to the applications which can be used to open it.||N|
The frequently found key "
Version=" is seemingly unused in Maemo at the time of this writing. Anyway according to http://standards.freedesktop.org/desktop-entry-spec/1.0/ar01s05.html it MUST NOT hold the version of the executable, rather it defines the format and version of the .desktop file itself *). In expression:
Version=1.0 is the only valid version key for .desktop files (of v1.0)
- )>>Version of the Desktop Entry Specification that the desktop entry conforms with. Entries that conform to this version of the specification should use 1.0. Note that the version field is not required to be present.
 Maemo extension keys
The following keys have a particular meaning on Maemo. None of these fields are required.
| ||string||The L10n domain from which the application name is translated (with dgettext)|
| ||string|| DBus service name - if specified hildon desktop will try to call the |
| ||string||Location of application loading image, will be loaded if there is no screenshot with the string of X-Osso-Service in $HOME/.cache/launch/, if none, no loading image is shown while the application is being started.|
| ||boolean||If true, the application will be started automatically at boot time. However: X-Maemo-Prestarted=always in calendar.desktop. Which works for e.g xchat as well|
| ||number||Priority for the application launch - lower means application is launched sooner|
| ||boolean||Ignore the low memory status when this application is launched. If this is absent, or set to false, an application will not be launched if there is insufficient memory available.|
| ||boolean||If true, prestart the app as soon as possible without regards to load or memory limits|
| ||string||The name of the DBus service to call to start this application on demand|
| ||string||Used in version 1 of URL handler to indicate URI handlers which this application can deal with|
| ||boolean||Allows installing multiple of these widgets on desktop (/usr/share/applications/hildon-home/*.desktop; needs reboot or killall hildon-home after edit)|
Note that while Maemo 5 (Fremantle) does not by default read the "
Categories="-entry from the desktop file, enhanced menu applications like Catorise do. It is recommended that you add a Categories line to the .desktop file.
Categories=Office; Office or whatever Category is suitable
The canonical source for the key types supported on Maemo for the application menu is the
hildon-desktop module, and specifically the files src/launcher/hd-launcher-item.c and src/launcher/hd-launcher-app.c
 URL handlers
 OS 2008 - Chinook
Format of Maemo .desktop files
Below are the fields supported in hildon-desktop:
- Should be application
- not used on Maemo, but used in Ubuntu mobile
- now unused, was used as second line of text in the startup menu in Bora
- set to true to hide the entry in the menu
- set to false to disable the startup notification banner
- used to override the expected window class name, default to the binary name
Some Maemo-specific extensions:
- set the L10n domain from which the application name is translated (with dgettext)
- a DBus service name - if specified hildon desktop will try to call the
top_applicationmethod on this service rather than execute what is listed in the Exec field).
(Credits to Johan Billen)
BTW: If your application needs the browser to do special URL handling, the desktop file needs to be extended accordingly.
 Further reading
- This page was last modified on 24 March 2011, at 15:51.
- This page has been accessed 25,880 times.