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:
[[!format txt """
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:
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-mime-database after adding the .desktop file and storing the icon.
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.