Skip to content

Recognized Desktop Entry Keys

Sean Davis edited this page Mar 25, 2021 · 4 revisions

Reference Documentation

Value Types

Type Description Widget
Boolean True/False, On/Off keys. Default to False/Off. Switch
String Text. Used for most standard keys. Text Entry
Icon String Text. Used for icon names and icon file paths. Icon Picker, File Browser
Locale String Localized Text. Keys follow the pattern "Name[locale]". Text Entry

Standard Keys

Type

There are 3 types of desktop entries: 1) Application, 2) Link, and 3) Directory. MenuLibre only supports Application and Directory. This option is not displayed.

Type: String   Required: Yes   Displayed: No

Version

Version of the Desktop Entry Specification that the desktop entry conforms with. MenuLibre supports up to version 1.1 of the specification, and generates version 1.1-compliant entries.

Type: String   Required: No   Displayed: No

Name

Specific name of the application, for example "Mozilla Firefox".

Type: Locale String   Required: Yes   Displayed: Yes

GenericName

Generic name of the application, for example "Web Browser".

Type: Locale String   Required: No   Displayed: Yes

NoDisplay

Do not show the application in the menu. Used to associate MIME types, so files can be opened without requiring a listing in the menu. MenuLibre combines this with the Hidden key as "Hide from menus".

Type: Boolean   Required: No   Displayed: Yes, as key "Hide from menus".

Comment

Tooltip for the entry, for example "View sites on the Internet".

Type: Locale String   Required: No   Displayed: Yes

Icon

Icon to display in the file manager, menus, and elsewhere. If the value is an absolute path, the given file with be used. Otherwise, the icon will be used according to the Icon Theme Specification.

Type: Icon String   Required: No   Displayed: Yes, as the icon button

Hidden

Otherwise known as Deleted. Used to hide entries installed system-wide, and is strictly equivalent to the entry not existing at all. MenuLibre combines this with the NoDisplay key as "Hide from menus".

Type: Boolean   Required: No   Displayed: Yes, as key "Hide from menus".

OnlyShowIn / NotShowIn

A semicolon-separated list of Strings identifying the desktop environments that should (not) display the desktop entry. The list is compared to the values found in the $XDG_CURRENT_DESKTOP environment variable.

Possible values include: Budgie, Cinnamon, EDE, GNOME, KDE, LXDE, LXQt, MATE, Pantheon, Razor, ROX, TDE, Unity, XFCE, and Old

Type: String(s)   Required: No   Displayed: Yes

DBusActivatable

Whether D-Bus activation is supported for this application. If true, implementations should launch the application by sending a D-Bus message. See D-Bus Activation for more information.

Type: Boolean   Required: No   Displayed: Yes

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 lookup up in the $PATH environment variable.

Type: String   Required: No   Displayed: Yes

Exec

Path to an executable file on disk to execute, possibly with arguments. If the path is not an absolute path, the file is lookup up in the $PATH environment variable. Field codes (those consisting of a % followed by a single character, displayed below) can be used to pass in arguments to the program when starting. See Exec key for more information.

Code Description
%f A single file path. If multiple files are selected, the application will be launched once for each file.
%F A list of files. Each file is passed as a separate argument to the application.
%u A single URL. Locale files may be passed as file: URLs or by their path.
%U A list of URLs. Each URL is passed as a separate argument to the application.
%i The Icon key of the desktop entry, passed as --icon value.
%c The localized name Name[locale] of the desktop entry.
%k The location of the desktop file, as either a URI or local filename. Empty if no location is known.

Type: String   Required: No   Displayed: Yes

Path

The working directory to run the application in.

Type: String   Required: No   Displayed: Yes

Terminal

Whether the application runs in a terminal window.

Type: Boolean   Required: No   Displayed: Yes

Actions

Semicolon-separated list of identifiers for application actions. Actions provide alternative functionality from the desktop entry, typically by right-clicking on the entry in supported desktop environments.

Type: String(s)   Required: No   Displayed: Yes

MimeType

Semicolon-separated list of the MIME type(s) supported by this application.

Type: String(s)   Required: No   Displayed: Yes

Categories

Semicolon-separated list of the categories in which the entry should be shown in a menu. For a list of supported categories, please the Desktop Menu Specification.

Type: String(s)   Required: No   Displayed: Yes

Implements

Semicolon-separated list of D-Bus interfaces the application implements. See Interfaces for more information.

Type: String(s)   Required: No   Displayed: Yes

Keywords

Semicolon-separated list of keywords used to describe this entry. Used to facilitate searching through entries in the application menu.

Type: Locale String(s)   Required: No   Displayed: Yes

StartupNotify

Whether the application supports startup notifications. If true, it is know that the application will send a "remove" message when started with the DESKTOP_STARTUP_ID environment variable set. If set to true but the application does not support it, a waiting cursor will be displayed for an indeterminate amount of time. See the Startup Notification Protocol Specification for more information.

Type: Boolean   Required: No   Displayed: Yes

StartupWMClass

Window mapping for at least one window displayed by the application. This is used in conjunction with StartupNotify, and also to associate applications with their desktop entries. See the Startup Notification Protocol Specification for more information.

Type: String   Required: No   Displayed: Yes

PrefersNonDefaultGPU

Whether the application prefers to be run on a more powerful GPU, if available. This key is only a hint, and may not be supported by all desktop environments.

Type: Boolean   Required: No   Displayed: Yes

X-GNOME-UsesNotifications

Whether the application sends notifications. This key is only a hint, and may not be supported by all desktop environments. Known supported desktops include GNOME and Pantheon.

Type: Boolean   Required: No   Displayed: Yes