Desktop Entries - Mon, Jul 29, 2024
Create and order GUI shortcuts
A .desktop file is a configuration file used by Linux desktop environments to define application shortcuts and launchers. It provides metadata about an application such as its name, icon, command to execute and other properties. These files are typically used to create shortcuts in application menus, desktop launchers or panels in Linux-based systems.
Application entry
Desktop entries for applications, or .desktop files, are generally a combination of meta information resources and a shortcut of an application. These files usually reside in /usr/share/applications/
or /usr/local/share/applications/
for applications installed system-wide, or ~/.local/share/applications/
for user-specific applications. User entries take precedence over system entries.
A .desktop file follows specific format and contains several key fields:
Name
: Specifies the name of application.Comment
: Provides brief description or comment about application.Exec
: Defines command to execute when launching application.Icon
: Specifies path to icon file associated with application.Terminal
: Specifies whether application should be run in a terminal window.Type
: Specifies type of entry such as “Application” or “Link.”Categories
: Specifies categories or groups under which the application should be displayed in the menu.StartupNotify
: Specifies whether desktop environment should show a startup notification for application.NoDisplay
: Specifies whether application should be hidden from menus.Actions
: Defines additional actions that can be performed on application such as opening a specific file.
Example file:
[Desktop Entry]
Type=Application
Name=alsamixergui
Exec=/usr/bin/alsamixergui
Icon=preferences-desktop
Comment=
Categories=AudioVideo;Audio;
Keywords=alsamixer;alsa;mixer;sound;volume;
NoDisplay=false
You can view a list of all categories here: https://specifications.freedesktop.org/menu-spec/latest/apa.html