Recognized desktop entry keys

Keys are either OPTIONAL or REQUIRED. If a key is OPTIONAL it may or may not be present in the file. However, if it isn't, the implementation of the standard should not blow up, it must provide some sane defaults. Additionally, keys either MUST or MAY be supported by a particular implementation.

Some keys only make sense in the context when another particular key is also present.

Some example keys: Name[C], Comment[it].

Table 2. Standard Keys

KeyDescriptionValue TypeREQ?MUST?Type
Type There are 4 types of desktop entries: Application (type 1), Link (type 2), FSDevice (type 3) and Directory (type 4). stringYESYES
Version Version of Desktop Entry Specification (While the version field is not required to be present, it should be in all newer implementations of the Desktop Entry Specification. If the version number is not present, a "pre-standard" desktop entry file is to be assumed). numericNOYES1-4
Name Specific name of the application, for example "Mozilla". localestringYESYES1-4
GenericName Generic name of the application, for example "Web Browser". localestringNOYES1-4
NoDisplay NoDisplay means "this application exists, but don't display it in the menus". This can be useful to e.g. associate this application with MIME types, so that it gets launched from a file manager (or other apps), without having a menu entry for it (there are tons of good reasons for this, including e.g. the netscape -remote, or kfmclient openURL kind of stuff). booleanNONO1-4
Comment Tooltip for the entry, for example "View sites on the Internet", should not be redundant with Name or GenericName. localestringNOYES1-4
Icon 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, an implementation-dependent search algorithm will be used to locate the icon. localestringNOYES1-4
Hidden Hidden should have been called Deleted. It means the user deleted (at his level) something that was present (at an upper level, e.g. in the system dirs). It's strictly equivalent to the .desktop file not existing at all, as far as that user is concerned. This can also be used to "uninstall" existing files (e.g. due to a renaming) - by letting make install install a file with Hidden=true in it. booleanNONO1-4
OnlyShowIn, NotShowIn A list of strings identifying the environments that should display/not display a given desktop entry. Only one of these keys, either OnlyShowIn or NotShowIn, may appear in a group (for possible values see the Desktop Menu Specification). string(s)NONO1-4
FilePattern A list of regular expressions to match against for a file manager to determine if this entry's icon should be displayed. Usually simply the name of the main executable and friends. regexp(s)NONO1
TryExec File name of a binary on disk used to determine if the program is actually installed. If not, entry may not show in menus, etc. stringNONO1
Exec Program to execute, possibly with arguments. stringNOYES1
Path If entry is of type Application, the working directory to run the program in. stringNOYES1
Terminal Whether the program runs in a terminal window. booleanNOYES1
Actions Additional actions possible, see MIME type discussion in the section called “Registering MIME Types”. string(s)NOYES1
MimeType The MIME type(s) supported by this entry. string(s)NONO1
Categories Categories in which the entry should be shown in a menu (for possible values see the Desktop Menu Specification). string(s)NONO1
StartupNotify If true, it is KNOWN that the application will send a "remove" message when started with the DESKTOP_LAUNCH_ID environment variable set (see the Startup Notification Protocol Specification for more details). booleanNONO1
StartupWMClass If true, it is KNOWN that the application will map at least one window with the given string as its WM class or WM name hint (see the Startup Notification Protocol Specification for more details). stringNONO1
URL If entry is Link type, the URL to access. stringNOYES2
Dev The device to mount. stringNONO3
FSType The type of file system to try to mount. stringNONO3
MountPoint The mount point of the device in question. stringNONO3
ReadOnly Specifies whether or not the device is read only. booleanNONO3
UnmountIcon Icon to display when device is not mounted. Mounted devices display icon from the Icon key. UnmountIcons may be localized with the UnmountIcon[xx]= syntax. stringNONO3
SortOrder This may specify the order in which to display files. string(s)NONO4