Key | Description | Value Type | REQ? | Type |
---|---|---|---|---|
Type | This specification defines 3 types of desktop entries: Application (type 1), Link (type 2) and Directory (type 3). To allow the addition of new types in the future, implementations should ignore desktop entries with an unknown type. | string | YES | |
Version | Version of the Desktop Entry Specification that the desktop entry conforms with. Entries that confirm with this version of the specification should use 1.0 . Note that the version field is not required to be present. | string | NO | 1-3 |
Name | Specific name of the application, for example "Mozilla". | localestring | YES | 1-3 |
GenericName | Generic name of the application, for example "Web Browser". | localestring | NO | 1-3 |
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). | boolean | NO | 1-3 |
Comment | Tooltip for the entry, for example "View sites on the Internet". The value should not be redundant with the values of Name and GenericName . | localestring | NO | 1-3 |
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, the algorithm described in the Icon Theme Specification will be used to locate the icon. | localestring | NO | 1-3 |
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. | boolean | NO | 1-3 |
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 orNotShowIn , may appear in a group (for possible values see the Desktop Menu Specification). | string(s) | NO | 1-3 |
TryExec | Path to an executable file on disk used to determine if the program is actually installed. If the path is not an absolute path, the file is looked up in the $PATH environment variable. If the file is not present or if it is not executable, the entry may be ignored (not be used in menus, for example). | string | NO | 1 |
Exec | Program to execute, possibly with arguments. See the Exec key for details on how this key works. | string | YES | 1 |
Path | If entry is of type Application , the working directory to run the program in. | string | NO | 1 |
Terminal | Whether the program runs in a terminal window. | boolean | NO | 1 |
Actions | Identifiers for application actions. This can be used to tell the application to make a specific action, different from the default behavior. The Application actions section describes how actions work. | string(s) | NO | 1 |
MimeType | The MIME type(s) supported by this application. | string(s) | NO | 1 |
Categories | Categories in which the entry should be shown in a menu (for possible values see the Desktop Menu Specification). | string(s) | NO | 1 |
Keywords | A list of strings which may be used in addition to other metadata to describe this entry. This can be useful e.g. to facilitate searching through entries. The values are not meant for display, and should not be redundant with the values of Name or GenericName . | localestring(s) | NO | 1 |
StartupNotify | If true, it is KNOWN that the application will send a "remove" message when started with the DESKTOP_STARTUP_ID environment variable set. If false, it is KNOWN that the application does not work with startup notification at all (does not shown any window, breaks even when using StartupWMClass, etc.). If absent, a reasonable handling is up to implementations (assuming false, using StartupWMClass, etc.). (See the Startup Notification Protocol Specification for more details). | boolean | NO | 1 |
StartupWMClass | If specified, 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). | string | NO | 1 |
URL | If entry is Link type, the URL to access. |
转载地址:http://api.viglink.com/api/click?format=go&key=2eb408cc2c50987197238dbc2c414aa8&loc=http%3A%2F%2Fwww.linuxforums.org%2Fforum%2Fubuntu-linux%2F122427-how-create-desktop-file.html&v=1&libid=1353988844052&out=http%3A%2F%2Fstandards.freedesktop.org%2Fdesktop-entry-spec%2Flatest%2F&ref=http%3A%2F%2Fwww.google.com.hk%2Furl%3Fsa%3Dt%26rct%3Dj%26q%3D%26esrc%3Ds%26source%3Dweb%26cd%3D1%26ved%3D0CC4QFjAA%26url%3Dhttp%253A%252F%252Fwww.linuxforums.org%252Fforum%252Fubuntu-linux%252F122427-how-create-desktop-file.html%26ei%3DWjq0UOXgHeWBiQeJ2oDAAg%26usg%3DAFQjCNH9RepiXubxekuPuxvcJP_5D3aC6g%26sig2%3DX0lrWqI9I1ItwiC_UBlhzw%26cad%3Drjt&title=How%20to%20create%20a%20.desktop%20file%3F&txt=Desktop%20Entry%20Specification&jsonp=vglnk_jsonp_13539896795913
http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html