Archive | gnome RSS feed for this section

The “all users” menu in Gnome

18 Sep

In Microsoft Windows there’s a menu of applications; it’s made from a set of icons which can be specific to each user and a set which appear for all users.

The same is true on Linux for the Gnome desktop but the approach is different. The user specific “shortcuts” are stored in the ~/.local/share/applications directory (they’re .desktop files) and the system wide shortcuts are in /usr/share/applications (Note that these directories can be changed but that’s where they are on my┬áRHEL 6 box)

The files are plain text so they’re easy to edit but you can also use the alacarte application to create them.

The sub-menus are a bit more complicated. These are controlled by a file called /etc/xdg/menus/application.menus which is an XML file. If you look at it you’ll see that there are blocks for each menu. Adding another menu just means adding another <menu> block. For example,

<!– Maths –>
will add a menu called Maths. To make icons appear in this section you need to make sure that there’s a “categories=Maths” line in the .desktop files.

It’s pretty easy to do this but it took me ages to find out so I thought I’d write about it in case it helps someone else!