Where to Discuss?


Goal: Using openbox-menu Script as Dynamic Openbox menu.

Table of Content

1: openbox-menu Script

My friend, named Addy DCVLXVI, as always giving me a good suggestion. openbox-menu, a very useful trick, to make an openbox menu without sweating.


XDG menus

If you haven’t notice, there are these files in /etc/xdg/menus.

openbox-menu: /etc/xdg/menus

We are going to utilize this. For this example let use use this lxde-applications.menu.

Create the ~/.config/openbox/menu.applications.xml.

$ openbox-menu lxde-applications.menu > ~/.config/openbox/menu.applications.xml

Sometime there are icon errors. you can surpress with redirecting to /dev/null.

$ openbox-menu lxde-applications.menu > ~/.config/openbox/menu.applications.xml 2> /dev/null

openbox-menu: pipe to file

To create dynamic menu, we utilize script, and use menu execute="".

Modify the ~/.config/openbox/menu.xml.

    <menu execute="cat /home/epsi/.config/openbox/menu.applications.xml" 
        id="lxde-apps" label="LXDE Applications"/>

Consider reconfigure openbox. And have a look at the result.

$ openbox --reconfigure

openbox-menu: lxde-applications.menu

Voila… It is so easy.

2: Install openbox-menu

The downside of this method is, sometimes it is not easy to setup. Debian based, and Gentoo play well with this openbox-menu. Other than that, we might need to clone from repository.


Install in Debian-based is as easy as:

$ sudo apt install openbox-menu lxmenu-data

openbox-menu: apt install


Install in Gentoo is as easy as:

$ emerge --ask openbox-menu lxmenu-data

openbox-menu: emerge lxmenu-data

Allright, now you can apply the USE by applying.

$ etc-update

And run it, once again.

$ emerge --ask openbox-menu lxmenu-data

openbox-menu: emerge openbox-menu

Mercurial Clone

The official documentation is here:

We need to know where the source:

This is a mercurial repository. Not a git repository. And here is the magical command:

$ hg clone https://bitbucket.org/fabriceT/openbox-menu

openbox-menu: hg clone (mercurial)

make and make install

As usual common installation from source.

$ make

openbox-menu: make

$ sudo make install

openbox-menu: sudo make install

Now you can run from anywhere in your linux box.

$ openbox-menu

openSUSE Dependency

lxmenu-data is available in openSUSE repository

$ sudo zypper in lxmenu-data

In order to compile the source above properly, you need to install the development package, as the compile time dependency.

  • gtk2-devel

  • menu-cache-devel

$ sudo zypper install gtk2-devel

openbox-menu: zypper gtk2-devel

$ sudo zypper install menu-cache-devel

openbox-menu: zypper menu-cache

Fedora Dependency

lxmenu-data is also available in repository

$ sudo dnf install lxmenu-data

openbox-menu: dnf gtk2-devel: .img-responsive }

In order to compile the source above properly, you need to install the development package, as the compile time dependency.

$ sudo dnf install gtk2-devel

openbox-menu: dnf gtk2-devel

$ sudo dnf install menu-cache-devel

openbox-menu:dnf menu-cache

What’s Next

Consider continue reading [ Menu: Generator ].