5

I recently asked this question as I could not google the documentation for how .desktop files should look like. Does such documentation exist? Where is it?

2 Answers 2

8

The file format is specified in the Freedesktop.org Desktop Entry Specification

1

There is a good wiki about Unity Launchers and Desktop Files in the Ubuntu documentation. Click here for more info.

This is what a general .desktop file looks like -

[Desktop Entry]
Version=1.0
Name=ProgramName
Comment=This is my comment
Exec=/home/dennyac/executable.sh
Icon=/home/dennyac/icon.png
Terminal=false
Type=Application
Categories=Utility;Application;

Version - Version of the .desktop file.

Name - Name of the Application.

Comment - Comment that describes the program.

Exec - Path to the executable file.

Icon - Path to the icon (Generally a png or xpm file).

Terminal - Either true or false (Determines whether application should run in a terminal.

Type - Type of the launcher file(Link, Application, Directory).

Categories - Specifies the category of the application. It is used by the Dash to decide under which category it should be placed.

To view it in the Dash, place the .desktop file in /usr/share/applications/ or at ~/.local/share/applications/.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .