Novell Home

Add and Remove Global Applications on the GNOME Menu

Novell Cool Solutions: Tip
By Cody Dabb

Digg This - Slashdot This

Posted: 21 Oct 2004
 

Cody Dabb has been a Linux Admin for almost 3 years. The systems which he has been working most are Gentoo, SUSE, NLD and Red Hat. He got in to Linux about four years ago and has not turned back. Most of his background has been working with Linux Servers in Network Operation Centers, and small to medium size enterprise corporations.

Adding Applications:

To edit the Gnome menu you must be root.
# su

Change in to the GNOME applications directory:
# cd /opt/gnome/share/applications

You need to create *.desktop for the new application. This would normally get setup with the applications name .desktop. With this example we are going to setup Digikam:
# vi digikam.desktop

Add in the following entry in to the digikam.desktop:

[Desktop Entry]
Name=Digikam
Exec=digikam
Icon=/opt/kde3/share/icons/crystalsvg/16x16/apps/digikam.png
Terminal=false
Type=Application
Categories=Application;Graphics;Digikam;

Save file.

In the "Categories=" you see "Graphics". This is where it will show up in the GNOME menu. (Note: This may not match the main menu) To see what the categories should be, go to the following directory:
#cat /etc/opt/gnome/gnome-vfs-2.0/vfolder/applications-all-users.vfolder-info | more

The "Application" is stating that you are adding adding an application to the sub-menu of "Graphics". Now the third one is the applications name being added. So for this example the Digikam will get add to Programs-> Graphics-> Digikam.

When you go through this file you will see the GNOME menus. Once you find the place the application should go, look at the 2nd <keyword> option. This will be the name you will want to change the "Graphics" to in the "Categories".

Removing Applications

The best way to remove the application from the GNOME menu is to remove the package from the system. However, if you still would like the application but want it out of the GNOME menu please do the following:

Change to the following Directory:
# cd /opt/gnome/share/applications

View what is in the directory:
# ls

Once you find the application you can delete it or move it in to a different folder. To delete the application from the menu do the following:
# rm digikam.desktop

This will delete the application. (Note: if you do this the application will be gone. You will need to recreate it if you need it back.)

To save the application create a new directory and move the .desktop in to it.
# mkdir AppSave
# mv digikam.desktop AppSave

Removing GNOME Menu Items

Switch user to root and go to the following directory:
# cd /etc/opt/gnome/gnome-vfs-2.0/vfolders/

Edit the applications-all-users.vfolder-info file:
# vi applications-all-users.vfolder-info

To remove an item locate the associated section within the file and comment it out using <!-- to begin the commented section and --> to end.

Example:
If you would like to remove the Games menu, locate the following section and comment it out as shown here.

<!--
   <Folder>
   <Name>Games</Name>
   <Desktop>Games.directory</Desktop>
   <Query>
    <And>
     <Keyword>X-Ximian-Main</Keyword>
     <Keyword>Application</Keyword>
     <Keyword>Game</Keyword>
    </And>
   </Query>
   <DontShowIfEmpty/>
-->

<!--More -->

<!--
   <Folder>
   <Name>More</Name>
   <Desktop>More.directory</Desktop>
   <Query>
    <And>
     <Keyword>Application</Keyword>
     <Keyword>Game</Keyword>
    </And>
   </Query>
   <DontShowIfEmpty/>
   <OnlyUnallocated/>
</Folder>
-->

You will notice that there is a commented item (<!--More -->) in the middle of the section that needs to be commented. You will need to end your comment before the item and then start your comment again after the item. If this is not done your panels may not work at all.

Logout of GNOME and back in again to see the changes that have been made to the menus.


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell