## Howto: A small guide on integration of your application _Note: For the formal description, see the [[standard text|http://standards.freedesktop.org/desktop-entry-spec/latest/]]_ 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: [[!format txt """ [Desktop Entry] Name=Foo Comment=An amazingly useful program Exec=foo Icon=foo Type=Application Categories=Graphics;3DGraphics; """]] 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` ### Icons 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. ### Autotools If you are using GNU Autotools, you will want to write this to Makefile.am: [[!format txt """ desktopdir = $(datadir)/applications desktop_in_files = appname.desktop.in desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) @INTLTOOL_DESKTOP_RULE@ """]] This is if you want to use translations (= little bit complicated), if not, just tell it to put the foo.desktop file to desktopdir.