Adding a menu item to the Gnome menus

Here is what I did to do to get RHEL 6 to add mrxvt to the menu structure it uses in gnome. I wanted to do it in userspace.

(0) Installed mrxvt. I went to

http://pkgs.repoforge.org/mrxvt/

and grabbed

mrxvt-0.5.1-1.el6.rf.x86_64.rpm

and the browser handed the file off to the package manager and it installed automagically, once I put in the admin password. It is also possible to install an rpm manually. mrxvt does not appear to be in the repos for my distribution (RHEL 6). It’s not in EPEL either.

(1) Opened a terminal and went to

~/.local/share/applications

(2) vi mrxvt.desktop

(3) Put this text in the file and saved it:

[Desktop Entry]
Version=1.0
Name=mrxvt
GenericName=mrxvt
X-GNOME-FullName=mrxvt
Comment=Light tabbed terminal emulator
Type=Application
Categories=GNOME;Applications;System;
Exec=/usr/bin/mrxvt
TryExec=/usr/bin/mrxvt
Terminal=false
StartupNotify=true
Icon=/home/dgoossens/Pictures/icons/mrxvt_icon.png

The most tricky line is the ‘Categories’ line — these categories are NOT the same as the headings of the menus and submenus, but magical incantations that need to be deduced by looking at the working .desktop files that you can find in places on your system like
/usr/share/applications
or by resorting to searching the web.

(4) Put my icon in the right place. It looks like this:

My <tt>mrxvt</tt> icon. Take it if you like!

My mrxvt icon. Take it if you like! It took me about two minutes in xFig.

(5) Logged out and back in.

(6) And there it is.

<tt>mrxvt</tt> in the 'Applications' menu.

mrxvt in the ‘Applications’ menu.

 

End.

Advertisements

Tags: , , , , ,

About Darren

I'm a scientist by training, based in Australia.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: