Desktop Files

From RockWiki

Jump to: navigation, search

Some desktop environments like KDE and Gnome implement the Desktop Entry Specification issued by https://freedesktop.org. ROCK has mechanisms in place to ease the installation of desktop files.

Creating a desktop file

Usually a package has one desktop file. It is considered best practice to call it <pkg>.desktop. Thus the desktop file for bzflag would be called bzflag.desktop. Just put it into the package directory and ROCK will automatically put it into the right place where it can be found by KDE, Gnome and other desktop environment.

The bzflag.desktop file actually looks like this:

[Desktop Entry]
Encoding=UTF-8
Name=BZFlag
Comment=3D Shooting game
Exec=bzflag
Terminal=false
Type=Application
Categories=Game;ActionGame
X-ROCK-Name=bzflag
Icon=D_datadir/bzflag-32x32.xpm

From this example you can easily work out your own desktop file. To get a list of possible entries for the Categories, have a look at the menu-spec issued by https://freedesktop.org. The usual ROCK Substitutions apply.

Personal tools