What is the DESKTOP file format?
.desktop files are application launcher shortcuts used across Linux and Unix desktop environments that comply with the freedesktop.org XDG (Cross Desktop Group) specifications. They serve as the Linux equivalent of Windows .LNK shortcut files, defining how an application is launched, displayed, and categorized in application menus, taskbars, and file managers.
The format is a plain UTF-8 text file in INI/key-file syntax, beginning with a required [Desktop Entry] section header. Mandatory keys are Type (typically Application, Link, or Directory) and Name (the display label shown in menus). Common additional keys include Exec (the launch command), Icon (icon name or path), Categories (FDO menu categories), MimeType (file type associations), and Terminal (whether to open a terminal window). Locale-specific translations are declared inline with bracketed language codes such as Name[de]= or Name[fr]=. Additional [Desktop Action X] sections define quick-action entries shown in right-click menus.
System-wide .desktop files are installed to /usr/share/applications/; per-user launchers live in ~/.local/share/applications/. All major Linux desktop environments implement the specification, including GNOME, KDE Plasma, Xfce, MATE, and Cinnamon.
Because .desktop files can execute arbitrary shell commands via the Exec key, modern desktop environments warn or refuse to run .desktop files that have not been explicitly marked executable by the user.
Security & safety
RISK: MEDIUM.desktop files can execute arbitrary shell commands via the Exec key. A malicious .desktop file disguised as a document can run malware on Linux. GNOME, KDE, and Xfce now require the file to have the executable permission bit set and show a warning prompt before executing downloaded .desktop files. Never mark a .desktop file from an untrusted source as executable.
Format details
in a nutshell- DesktopX Widget/Theme File - Stardock DesktopX (Windows, discontinued ~2005, EOL on Windows 10+) used .desktop for exported widget packages - entirely unrelated to the Linux XDG format.
Programs that open DESKTOP files
Technical details
deep spec| Encoding | UTF-8 text |
| MIME type | application/x-desktop |
| Container | INI/key-file format (XDG Desktop Entry Specification) |
| File signature | [Desktop Entry] group header as first non-comment line |
| Specification | freedesktop.org Desktop Entry Specification 1.5 (2020); backward-compatible with 1.0-1.4 |
| Required keys | Type (Application | Link | Directory) and Name |
| Common optional keys | Exec, Icon, Categories, MimeType, Terminal, StartupNotify, Actions |
| Locale support | Inline bracketed language codes - e.g., Name[de]=, Name[fr]= |
| Quick actions | [Desktop Action X] sections define right-click context-menu entries |
| System install path | /usr/share/applications/ (global) or ~/.local/share/applications/ (per-user) |
| Typical file size | Under 2 KB |
| Security note | Exec key can run arbitrary commands; modern desktop environments require the executable bit set before running untrusted .desktop files |
| Supported environments | GNOME, KDE Plasma, Xfce, MATE, LXDE/LXQt, Cinnamon, and all freedesktop.org-compliant Linux/Unix desktop environments |
| Released | 2001 (freedesktop.org Desktop Entry Specification 0.9.x) |
| Latest version | Desktop Entry Specification 1.5 (2020) |
| Open standard | Yes · royalty-free |
| Specification | specifications.freedesktop.org |
DESKTOP conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about DESKTOP files.