Adding submenus to Gnome

July 11, 2005

It's interesting how easily I can use Google to embarrass myself.

Last week, I spent most of an entire day trying to work out how to add a submenu to the default main application menu in the Gnome Fedora Core 4 configuration. (Not building the submenu itself; we had already done that for a previous Red Hat release. Just figuring out how to get it to appear, so that all the students who use the default configuration would see our local application menu.)

I was all set to write a grumpy entry about how information about how to do this should be more widely distributed, but decided to try Googling something like 'Gnome adding submenu'. Tragically for my plans, this actually turns up information on how to do it; the best guide is here.

For future Googling, here's the answer:

Fedora Core 4 uses the standard for menus (adopted by both Gnome and KDE). This puts the master application menu creation in /etc/xdg/menus/ (an easily read XML file).

Submenus can be created either by directly editing that file, or by creating new files in the applications-merged subdirectory, using the same XML syntax. (Important safety tip: remember to copy the doctype.)

Moral: I should Google, even before starting something that I think will be a quick and easy task. Especially if the quick and easy task starts getting a bit long and annoying.

Written on 11 July 2005.
« Tools versus frontends in systems programs
Chasing a problem in our Gnome customizations »

Page tools: View Source, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Mon Jul 11 23:43:56 2005
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.