Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 6 down vote accepted

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

share|improve this answer

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/.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.