You are not logged in.
I have been trying (unsuccessfully) for a few hours to use the XDG wiki's entry to put in a nice menu in my openbox setup. I have followed the advice given below:
OpenBox
With xdg_menu
Generate menu with
$ xdg_menu --format openbox3 --root-menu /etc/xdg/menus/arch-applications.menu >xdg-menu.xml
and manually add it into your menu.xml. For example, put xdg-menu.xml into menu.xml and add:
<menu id="Applications" />
into root-menu.With update-menus
Uncomment openbox in /etc/update-menus.conf
run update-menus as root
change your menu.xml file to include generated menu.
For example, add following to root-menu:
<menu id="xdg-menu" label="XDG Menu" execute="cat /var/cache/xdg-menu/openbox/menu.xml"/>I have had zero success with either method. I have also tried to follow and use the Fedora xdg script mentioned further down the wiki page.
I can generate a menu with the update-menus method. I can also call xdg_menu in a term window and I get a list of apps on-screen. However I can't seem to figure out how to add the menu(s) to my openbox menu list!
Help very much appreciated. I realise I'm probably doing something incredibly stupid so hopefully someone can point out how I can stop being an ignorant fool. ![]()
{edit} Just to be clear: using mmaker to manually generate a file does make a menu; however, after saving it as .cache/openbox/menu.xml and either reconfiguring openbox, with "openbox --reconfigure" or using the menu to do so, my menu does not change.
My current openbox menu.xml --
<?xml version="1.0" encoding="UTF-8"?>
<openbox_menu xmlns="http://openbox.org/3.4/menu">
<item label="Calculator">
<action name="Execute">
<command>gnome-calculator</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="Character Map">
<action name="Execute">
<command>gnome-character-map</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="Ark File Archiver">
<action name="Execute">
<command>ark</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
</menu>
<menu id="apps-editors-menu" label="Editors">
<item label="GVim">
<action name="Execute">
<command>gvim</command>
<startupnotify>
<enabled>yes</enabled>
<wmclass>GVim</wmclass>
</startupnotify>
</action>
</item>
<item label="Emacs">
<action name="Execute">
<command>emacs</command>
<startupnotify>
<enabled>yes</enabled>
<wmclass>Emacs</wmclass>
</startupnotify>
</action>
</item>
<item label="GEdit">
<action name="Execute">
<command>gedit</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="Kate">
<action name="Execute">
<command>kate</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="Kwrite">
<action name="Execute">
<command>kwrite</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
</menu>
<menu id="apps-term-menu" label="Terminals">
<item label="Rxvt Unicode">
<action name="Execute">
<command>urxvt</command>
</action>
</item>
<item label="Gnome Terminal">
<action name="Execute">
<command>gnome-terminal</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="Xfce Terminal">
<action name="Execute">
<command>xfce4-terminal</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="Konsole">
<action name="Execute">
<command>konsole</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="Xterm">
<action name="Execute"><command>xterm</command></action>
</item>
</menu>
<menu id="apps-net-menu" label="Internet">
<item label="Firefox">
<action name="Execute">
<command>firefox</command>
<startupnotify>
<enabled>yes</enabled>
<wmclass>Firefox</wmclass>
</startupnotify>
</action>
</item>
<item label="Opera">
<action name="Execute">
<command>opera</command>
<startupnotify>
<enabled>yes</enabled>
<wmclass>Opera</wmclass>
</startupnotify>
</action>
</item>
<item label="Konqueror">
<action name="Execute">
<command>konqueror</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="Epiphany">
<action name="Execute">
<command>epiphany</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="Pidgin Instant Messenger">
<action name="Execute">
<command>pidgin</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="Kopete Instant Messenger">
<action name="Execute">
<command>kopete</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="XChat">
<action name="Execute">
<command>xchat</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
</menu>
<menu id="apps-office-menu" label="Office">
<item label="OpenOffice Base">
<action name="Execute">
<command>ooffice -base</command>
</action>
</item>
<item label="OpenOffice Calc">
<action name="Execute">
<command>ooffice -calc</command>
</action>
</item>
<item label="OpenOffice Draw">
<action name="Execute">
<command>ooffice -draw</command>
</action>
</item>
<item label="OpenOffice Impress">
<action name="Execute">
<command>ooffice -impress</command>
</action>
</item>
<item label="OpenOffice Math">
<action name="Execute">
<command>ooffice -math</command>
</action>
</item>
<item label="OpenOffice Printer Administration">
<action name="Execute">
<command>ooffice-printeradmin</command>
</action>
</item>
<item label="OpenOffice Writer">
<action name="Execute">
<command>ooffice -writer</command>
</action>
</item>
</menu>
<menu id="apps-multimedia-menu" label="Multimedia">
<item label="Amarok">
<action name="Execute">
<command>amarok</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="Rhythmbox">
<action name="Execute">
<command>rhythmbox</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="K3b">
<action name="Execute">
<command>k3b</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="MPlayer">
<action name="Execute">
<command>gmplayer</command>
<startupnotify>
<enabled>yes</enabled>
<wmclass>MPlayer</wmclass>
</startupnotify>
</action>
</item>
<item label="Totem">
<action name="Execute">
<command>totem</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
</menu>
<menu id="apps-fileman-menu" label="File Managers">
<item label="Nautilus">
<action name="Execute">
<command>nautilus --no-desktop --browser</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="Thunar">
<action name="Execute">
<command>Thunar</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="KDE File Manager">
<action name="Execute">
<command>kfmclient openURL ~</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="Rox">
<action name="Execute">
<command>rox</command>
<startupnotify>
<enabled>yes</enabled>
<wmclass>ROX-Filer</wmclass>
</startupnotify>
</action>
</item>
<item label="PCMan File Manager">
<action name="Execute">
<command>pcmanfm</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
</menu>
<menu id="apps-graphics-menu" label="Graphics">
<item label="Gimp">
<action name="Execute">
<command>gimp</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="Gwenview">
<action name="Execute">
<command>gwenview</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="Dia Diagram Editor">
<action name="Execute">
<command>dia</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
<item label="Inkscape">
<action name="Execute">
<command>inkscape</command>
<startupnotify>
<enabled>yes</enabled>
</startupnotify>
</action>
</item>
</menu>
<menu id="system-menu" label="System">
<item label="Openbox Configuration Manager">
<action name="Execute">
<command>obconf</command>
<startupnotify><enabled>yes</enabled></startupnotify>
</action>
</item>
<item label="Gnome Control Center">
<action name="Execute">
<command>gnome-control-center</command>
<startupnotify><enabled>yes</enabled></startupnotify>
</action>
</item>
<item label="KDE Control Center">
<action name="Execute">
<command>kcontrol</command>
<startupnotify><enabled>yes</enabled></startupnotify>
</action>
</item>
<item label="Xfce Settings">
<action name="Execute">
<command>xfce-setting-show</command>
<startupnotify><enabled>yes</enabled></startupnotify>
</action>
</item>
<item label="Manage Cups Printers">
<action name="Execute">
<command>xdg-open http://localhost:631/</command>
<startupnotify>
<enabled>no</enabled>
<icon>cups</icon>
</startupnotify>
</action>
</item>
<separator />
<item label="Reconfigure Openbox">
<action name="Reconfigure" />
</item>
</menu>
<menu id="root-menu" label="Openbox 3">
<separator label="Applications" />
<menu id="xdg-menu" label="XDG Menu" execute="cat /var/cache/xdg-menu/openbox/menu.xml"/>
<menu id="apps-accessories-menu"/>
<menu id="apps-editors-menu"/>
<menu id="apps-graphics-menu"/>
<menu id="apps-net-menu"/>
<menu id="apps-office-menu"/>
<menu id="apps-multimedia-menu"/>
<menu id="apps-term-menu"/>
<menu id="apps-fileman-menu"/>
<separator label="System" />
<menu id="system-menu"/>
<separator />
<item label="Log Out">
<action name="Exit">
<prompt>yes</prompt>
</action>
</item>
</menu>
</openbox_menu>Last edited by MoonSwan (2012-06-04 19:35:45)
Offline
you need a root-menu
<?xml version="1.0" encoding="utf-8"?>
<openbox_menu xmlns="http://openbox.org/">
<menu id="root-menu" label="Openbox 3">
<item label="Terminal" icon="/usr/share/pixmaps/openbox.png">
...Also, you'll need the closing </menu> at the end before the closing </openbox_menu>
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
K I'm an idiot I guess because I did (I think) as you said in your post, Trilby. I copy pasted your example to the top of my menu file and I have the </menu> before </openbox_menu>.
This is the top of my menu.xml:
<?xml version="1.0" encoding="UTF-8"?>
<openbox_menu xmlns="http://openbox.org/3.4/menu">
<menu id="root-menu" label="Openbox 3">
<menu id="apps-menu" label="xdg-menu" execute="python2 <path>/xdg-menu"/>
<menu id="apps-accessories-menu" label="Accessories">The last lines of my menu:
<separator />
<item label="Log Out">
<action name="Exit">
<prompt>yes</prompt>
</action>
</item>
</menu>
</openbox_menu>Thank you for the help! I'm trying to get this right, I swear!
Offline
I think you need to put your menu.xml file in $HOME/.config/openbox. (Actually $XDG_CONFIG_HOME/openbox)
Your original message infers that you are trying to put it in $HOME/.cache/openbox; which is, I believe, incorrect.
Offline
Thank you rockin turtle. I realised that shortly after I made my post. Gah idiotic mistake! Still working on the menu thing but I got a partial victory using archlinux-xdg-menu. I'll have to mess with this some more later.
Offline
Well, after messing about with the menu by using a combination of MenuMaker and obm-xdg I got my menus set up very nicely. Thank you Trilby and turtle for the aid with this issue.
However I have discovered a small snafu (bug?) where obm-xdg made a menu but half of the entries are in Chinese. I re-generated my locale but that didn't help.
Any ideas on what the hell is going on?
Offline
# pacman -S obmenuProblem solved.
I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).
Offline
In the end, and before seeing your post DSpider, I did install obmenu. I decided to ditch obm-xdg after reading about the fact that is isn't well maintained any longer and has some bugs in it that are still unresolved.
Offline