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?
The file format is specified in the Freedesktop.org Desktop Entry Specification
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 -
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