Hi List!
I've been searching for this the second time now, without result, therefore I ask here: where can I edit the contents of the gnome menu? I've been looking for vfolder-info files, but found only one, and that did not contain what I wanted to edit. Also, I did not find anything useful in google pertaining to FC2. Thanks very much, Daniel
I had the same problem and the same difficulty finding an answer, eventually I found a way of making it work. I apologise for a long posting....
This describes how I added a submenu (subdirectory?) to the main Gnome menu. The aim was to have a submenu titled "Remote Logins" on the main
menu, this submenu contained other submenus which in turn contained menu
items which start up remote X terminal sessions on different machines.
In ascii art:-
Remote Logins +------ Thor +-------- www | | | +-------- User A | | | +-------- User B | +------ Odin +-------- www | +-------- User A
etc..etc..
I tried Google, www.gnome.org, the Fedora site and found lots of hints but nothing that actually worked. Editing applications:/// didn't work, this seems to be something to do with the way Fedora is configured, the vfolder stuff didn't seem to work either. In the end I resorted to hand editing some configuration files and the result worked. That's all I claim for this method, it worked for me (with FC2), I don't know if its the "right" way or if it will work forever.
--------------------------------------------------------- First create a .directory file in /usr/share/desktop-directories which describes each submenu you want to add, one file for each menu.
/usr/share/desktop-directories/Remote.directory
[Desktop Entry] Name=Remote Logins Comment=Remote Logins Icon= Type=Directory
and
/usr/share/desktop-directories/Remote-Thor.directory
[Desktop Entry] Name=Thor Comment=Thor Icon= Type=Directory
---------------------------------------------------------
Next create a .desktop file in /usr/share/applications which describes the application (in this example the command to start the remote Xterm session). I actually found I could put all my local .desktop files in a subdirectory of /usr/share/applications which (to me) seems tidier.
/usr/share/applications/bhl/Thor_www.desktop
[Desktop Entry] Name=www Name[en_US.ISO8859-1]=www Exec=/usr/local/bin/remote thor www Icon=/usr/share/pixmaps/gnome-term.png Terminal=false MultipleArgs=false Type=Application Categories=Remote;Thor;
The "Categories" section is what splits entries into menus and seem to be arbitrary text strings which are referred to by other files ---------------------------------------------------------
At this point the ".desktop" entries start appearing on the Gnome menu but in a submenu "Other" (I think... it's been a while since I was at this stage). To get the entries into the menu structure required you need to edit the configuration file for the Gnome menu, this is found in /etc/xdg/menus
Again, to be "tidy" I add the minimum number of lines to the distributed configuration file and put all my extra bits in an included file. The following few lines are added to the end of "applications.menu"
/etc/xdg/menus/applications.menu
.................... .................... <MergeFile>applications-kmenuedit.menu</MergeFile>
<!-- Remote Logins 4 lines added by FAS --> <Menu> <Name>Remote</Name> <MergeFile>Remote.menu</MergeFile> </Menu> <!-- End Remote Logins -->
</Menu> <!-- End Applications -->
An the file Remote.menu referred to above looks like this...
/etc/xdg/menus/Remote.menu
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
<!-- Remote Logins --> <Menu> <Name>Remote</Name> <Directory>Remote.directory</Directory> <Include> <And> <Category>Remote</Category> <Not><Category>Thor</Category></Not> </And> </Include>
<Menu> <Name>Thor</Name> <Directory>Remote-Thor.directory</Directory> <Include> <And> <Category>Remote</Category> <Category>Thor</Category> </And> </Include> </Menu>
</Menu> <!-- End Remote Logins -->
This is where the "Categories" come in and split the ".desktop" entries into different menus. My actual "Remote.menu" file has many many more entries than this, but hopefully this minimal version will be enough to see what is going on.
After editing the files in /etc/xdg/menus I have found I need to restart Gnome to have the changes take effect, I suspect there may be a way to avoid this but I don't know what it is!!
FAS