Desktop Entries

Thanks to freedesktop.org, there is a standarized way among Linux desktop environments to create application shortcuts: desktop entries.

Some pages on this wiki might link you here, telling you to create a desktop entry with filename and content they specify.

You first have to decide where to create it. You can either do it system wide, in /usr/local/share/applications or just for your very user, that would be in your home directory in .local/share/applications.

Once you've decided where you'd like to store them, the directory has to be created, if it doesn't exist yet. For the local user way, run: mkdir -p ~/.local/share/applications For the system wide way, become super user and run: mkdir -p /usr/local/share/applications Now create the file in your chosen directory, paste the specified content into it and save it. You can now find that application in your menu, configure it to open specific file types or create a shortcut on your desktop.

You may need to restart your menu displaying application to see the changes you've just made. You can either do this by logging out and in again, or by killing the respective application. For GNOME, that would be: killall gnome-panel Note: A very important line in desktop files is the one beginning with Exec= - it tells the system what to execute when the icon is clicked. In this line, paths have to be escaped properly (that is, place a \ in front of every special character, most commonly spaces in directory and file names). Another common entry is Icon=, which tells the system which icon to use. For this entry, you do not need to escape paths - in fact, it won't work if you do.