2.4. 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 run, 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 have a .desktop file extension.

The following is a sample desktop entry file:

[Desktop Entry]
Comment=Perform simple calculations

Table 2.3 describes the most important keys in desktop entry files.

Table 2.3. Desktop Entry Keys

Desktop Entry Key



Specifies the encoding of the desktop entry file.


Specifies the name of the item. This name is displayed on the item in the menu.


Specifies a short description of the item. The comment is displayed as a tooltip when you point to the item in the menu.


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 filename extension.


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 create a window in which to run, the value of this key must be true.


Specifies the type of item. This value is one of the following:

  • Application: Enter this option for an item that starts an application.

  • Link: Enter this option for an item that links to a file, folder, or FTP site.


Specifies the help file to display when you choose Help on application-name from the menu item popup menu.


Specifies the keywords that describe the item. The keywords are separated with semicolons (;). To see a list of the standard category keywords, see the following URL:


The vfolder information files map the keywords to menus.

For more information on the keys in desktop entry files, see the following URL:


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.

Vfolders and Menus
Contents Next
Directory Entry Files

About GNOME · Download · Users · Developers · Foundation · Contact