Skip Navigation Links | |
Exit Print View | |
Oracle Solaris 11.1 Desktop Administrator's Guide Oracle Solaris 11.1 Information Library |
1. Administering the Oracle Solaris Desktop
2. Managing User Preferences With GConf
Working With Menu Definition Files
Working With Directory Entry Files
Adding and Modifying System Menus
How to Edit the Properties of a Menu
How to Delete an Item From a Menu
Creating and Modifying User Menus
9. Overview of the Yelp Help Browser
10. Improving the Performance of the Oracle Solaris Desktop System
11. Disabling Features in the Oracle Solaris Desktop System
A desktop entry file is a data file that provides information about an item in a menu. The desktop entry file specifies the details for the item such as a name, a command to execute, an icon, and so on. The desktop entry file also contains keywords which determine the location of the item in the menu hierarchy. Desktop entry files must reside in the $XDG_DATA_DIRS/applications directory and must have a .desktop file extension.
The order in which the default paths are searched to resolve the location of .desktop files is as follows:
Search in the $XDG_DATA_HOME/applications directory. If the $XDG_DATA_HOME environment variable is not set, search in the ~/.local/share/applications default directory.
Search the applications subdirectory of each directory in $XDG_DATA_DIRS. If the $XDG_DATA_DIRS environment variable is not set, search in the /usr/share/applications default directory.
If several .desktop files with the same name are found, the file that is found first takes precedence.
The following example shows a sample desktop entry file.
[Desktop Entry] Encoding=UTF-8 Name=Calculator Name[fr]=Calculatrice ... Comment=Perform calculations Comment[fr]=Effectue des calculs complique ... Exec=gcalctool Icon=accessories-calculator Terminal=false Type=Application StartupNotify=true Categories=GNOME;GTK;Utility;Calculator
The following table describes some of the important keys in desktop entry files. For more information about desktop entry files, see the XDG Desktop Entry Specification.
Table 3-3 Desktop Entry Keys
|
For more information about the keys in desktop entry files, see the desktop entry specification.
Note - Panel launchers and desktop objects also use desktop entry files. The desktop entry files for launchers and desktop objects provide the same information as for items in a menu. For example, the desktop entry files provide the command to run when a user chooses the launcher or object.