IT lexicon › Infra & Ops › Desktop entry (.desktop file)

Desktop entry (.desktop file)

Infra & Ops På svenska → Updated: 2026-10-08
More info
Type
File format / specification
Owner
freedesktop.org
Spec
Desktop Entry Specification

The small text file that makes a program show up in the menu — name, icon, command and category — in a format KDE and GNOME eventually agreed on.

Every item in a Linux application menu is a file ending in .desktop in /usr/share/applications or the user's equivalent under ~/.local/share. The format looks like an INI file: a [Desktop Entry] group with keys such as Name, Exec, Icon, Categories and MimeType. Translations go in the same file as Name[sv]=, and placeholders such as %f in the command line say where the opened file should be inserted. The same format serves for links, menu directories and programs that should start automatically at login.

The origin is KDE's .kdelnk files from the late 1990s, which GNOME copied with small deviations, until freedesktop.org merged the variants into the Desktop Entry Specification. It is one of the desktop specifications that simply works: Flatpak and Snap export .desktop files for their applications, Wayland compositors read them unchanged, and desktop-file-validate complains when you misspell a key.

← Back to the lexicon