Skip to content

Instantly share code, notes, and snippets.

@Abdallah-Abdelazim
Last active June 1, 2021 19:01
Show Gist options
  • Save Abdallah-Abdelazim/286566ce31cc39cfedb1ec4b632b630a to your computer and use it in GitHub Desktop.
Save Abdallah-Abdelazim/286566ce31cc39cfedb1ec4b632b630a to your computer and use it in GitHub Desktop.
Template for creating desktop entries (launchers) on Linux

Template for creating desktop entries (launchers) on Linux

Create the following file, with your favourite editor:

  • Across all users: /usr/share/applications/application_name.desktop
  • For current user only: ~/.local/share/applications/application_name.desktop

Add the following content to the file and save:

[Desktop Entry]
Version=1.0
Type=Application
Name=<application-name>
Comment=<simple-description>
Exec=<command>
Icon=<path_to_icon_file>
Terminal=false
Categories=GNOME;Application;Development;IDE;GTK;Utility;
StartupWMClass=<unique-name-no-spaces>
StartupNotify=true

References:
[1] https://developer.gnome.org/integration-guide/stable/desktop-files.html.en
[2] https://specifications.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment