Howto: A small guide on integration of your application

Note: For the formal description, see the standard text

If you are a developer and you develop an application that has a GUI, you may consider putting some effort into integrating your application with the desktop environment.

What you have to do, is to provide a .desktop file. Let's assume that you have an application Foo. Then your foo.desktop file could look like this:

[Desktop Entry]
Comment=An amazingly useful program

You may want to pass $ desktop-file-validate foo.desktop to check out that your file is OK.

Then, you can install it: desktop-file-install foo.desktop


If you want to use your icon without specifying the full path to it, it has to have the same name as the executable and you should put it in the appropriate place somwhere under the /usr/share/icons/ directory.

You will want to run update-desktop-database and/or update-mime-database after adding the .desktop file and storing the icon.


If you are using GNU Autotools, you will want to write this to

desktopdir = $(datadir)/applications
desktop_in_files =
desktop_DATA = $(


This is if you want to use translations (= little bit complicated), if not, just tell it to put the foo.desktop file to desktopdir.