JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris 11.1 Desktop Administrator's Guide     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information


1.  Administering the Oracle Solaris Desktop

2.  Managing User Preferences With GConf

3.  Customizing Menus

Menus Overview

Working With Menu Definition Files

Working With Directory Entry Files

Working With Desktop Entry Files

Editing Menus

Adding and Modifying System Menus

How to Add a Menu

How to Add an Item to a Menu

How to Edit the Properties of a Menu

How to Edit a Menu Item

How to Delete an Item From a Menu

Creating and Modifying User Menus

Merging Menus

Merging User and System Menus

4.  Installing Themes

5.  Customizing Fonts

6.  Working With MIME Types

7.  Managing Screensavers

8.  Managing Sessions

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

12.  Working With the X Window System

A.  Hidden Directories



Working With Desktop Entry Files

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:

  1. 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.

  2. 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]
Comment=Perform calculations
Comment[fr]=Effectue des calculs complique

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

Desktop Entry Key
Specifies the keywords that describe the item. The keywords are separated with semicolons (;).

For a list of the standard category keywords, see the desktop menu specification at

To find out how to map desktop entries to menus by using matching rules with the Categories key, see Working With Menu Definition Files.

Specifies a short description of the item. The comment is displayed as a tooltip when you point to the item in the menu.
Specifies the encoding of the desktop entry file.
Specifies a command to execute when you choose the item from the menu.
Specifies the filename of an icon that represents the item. Does not specify the path to the filename or the file extension.
Specifies the MIME types that the application can handle.
Specifies the name of the item. This name is displayed on the item in the menu.
Specifies that an existing application should not be displayed in the menu.
Specifies whether the command in the Exec key runs in a terminal window. If the value is true, the command runs in a terminal window.

If the command does not open a window to run, the value of this key must be set to true.

Specifies the type of item. The value for the Type key is one of the following:
  • Application: An item that starts an application.

  • Link: An item that links to a file or folder, or a remote resource (such as an FTP site, or a web page).

  • FSDevice: An item that is a file system device.

  • Directory: An item that is a directory.

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.