Openbox-menu
Cette page est disponible en français
Presentation
My desktop is very simple : no panel, no icon on the desktop, not even a desktop. I needed somehow some comfort to be able to launch installed programs, categorized as offered by the panels (ie:lxpanel, xfce4-panel…). How to do that? Here comes Openbox, its dynamic menus (pipe-menus) and openbox-menu.
No need to reinvent the wheel : I will use menu-cache from LXDE project for the menu generation.
Screenshot
Dependencies
The program uses :
- libmenu-cache library from LXDE project menu-cache.
- GLib. It should not be a problem as Openbox already needs it.
- GTK+ 2.
If right click menu is empty, once openbox-menu installed and configured, you may want to install lxmenu-data. It has to be necessary if your environment doesn’t provides a basic menu definition structure.
Download
The latest version is available on Github.
Feel free to fork. I don’t use Openbox anymore.
Compilation & installation
Compilation
Untar the tarball
tar xzf openbox-menu-<version>.tar.bz2
cd openbox-menu
And compile it
make
That’s all! You should now have the openbox-menu binary.
Installation
Dynamic menu configuration is to be done in the menu.xml
file from /etc/xdg/openbox
or in the /home/USER/.config/openbox
directory. I recommand to choose your personal directory for the configuration file, but it’s up to you.
The program uses, as default, applications.menu file from /etc/xdg/menus directory
. It’s possible to use another file but it has to be located in /etc/xdg/menus
directory (that’s the way libmenu-cache library works).
First step, the dynamic menu needs to be declared in menu.xml this way.
<menu id="desktop-app-menu"
label="Applications"
execute="<path-to-exec>/openbox-menu" />
Openbox-menu will use applications.menu by default. If you want to use another menu description, ie lxde-applications.menu provided by lxmenu-data, just add the filename as argument.
<menu id="desktop-app-menu"
label="Applications"
execute="<path-to-exec>/openbox-menu lxde-applications.menu" />
Second step, now you’ll have to add this next line where the menu should appear in openbox root-menu menu.
<menu id="desktop-app-menu" />
Take a look at the menu.xml example below, it should be easier to understand: menu.xml
Post-installation
Libmenu-cache uses the menu-cached daemon to shorten the menu generation time. Therefore I recommand to add menu-cached in the openbox start file (~/.config/openbox/autostart.sh). Not anymore, it may cause issues.
Licence
Openbox-menu is under GPLv3.