Adding a new menu to the GNOME Panel

Introduction

For our distribution, we added a new menu category named "UB Applications" to contain items for the VPN Client, UBUNIX, Webmail, the CIT website, and others. The following steps show how we added this menu. All of these changes included in the distribution by using the ub-menu RPM to modify/install the appropriate files.

For GNOME 2.8 and higher, we need to modify the /etc/xdg/menus/applications.menu file and add a .directory file for the menu in the /usr/share/gnome/vfolders/ directory.

Modify applications.menu

The /etc/xdg/menus/applications.menu file is an XML document that lists the menu structure in GNOME. We added the following entry in the file to add our 'UB Applications' menu:
<!-- UBApps -- >
<Menu>
        <Name>UB Applications</Name>
        <Directory>UBApps.directory</Directory>
        <Include>
         <And>
          <Category>X-UB-Applications</Category>
         </And>
        </Include>
        </Menu> <!-- End UBApps -->

Create the .directory file

The corresponding .directory file needs to be created and placed in /usr/share/gnome/vfolders/. This is what our UBApps.directory file looks like:

[Desktop Entry]
Name=UB Applications
Comment=UB specific applications
Type=Directory
Icon=ub_blue.png

Create appropriate .desktop files

The last step is to populate our new menu. Create new menu items and place the files in /usr/share/applications/ just as described in Creating a Menu item. Make sure under 'Categories' you specify the category as defined in applications.menu, in this case, that is X-UB-Applications.


Back to Technical Documentation index

Send questions or comments to ublinux-support@buffalo.edu

Last Modified 8/18/05