Directory Entry Files
A directory entry file is a data file that provides information about a menu. The directory entry file specifies the details for the menu such as a name, a tooltip, and an icon. Directory entry files have a .directory file extension.
Directory entry files must reside in the $XDG_DATA_DIRS/desktop-directories directory. If $XDG_DATA_DIRS is not set, then the default path is /usr/share is used. This also implies that user specific directory entries may be located at $XDG_DATA_HOME/desktop-directories which is searched first. If $XDG_DATA_HOME is not set, then the default path ~/.local/share is used. Directory entries are collected from all directories in the $XDG_DATA_DIRS environment variable. Directories which appear first in $XDG_DATA_DIRS are given precedence when there are several .directory files with the same name.
The following is a sample directory entry file:
[Desktop Entry] Name=Graphics Name[fr]=Graphisme ... Comment=Graphics applications Comment[fr]=Applications graphiques ... Icon=gnome-graphics Type=Directory Encoding=UTF-8
Table 2-3 describes the most important keys in directory entry files.
Directory Entry Key | Description |
---|---|
Name | Specifies the name of the menu. This name is displayed on the menu. |
Comment | Specifies a short description of the menu. The comment is displayed as a tooltip when you point to the menu. |
Icon | Specifies the filename of an icon that represents the menu. Does not specify the path to the filename, or the file extension. |
Type | Specifies the type of menu. The value of this key is always Directory. |