Pages

Showing posts with label openbox. Show all posts
Showing posts with label openbox. Show all posts

December 20, 2010

XDG menus in Openbox

Now I feel stupid. For year(s) I've been sorta griping about how the Openbox menu doesn't give you a program listing that coincides with what you get in GNOME, Xfce, and even fbpanel. I've hunted for solutions to this before but came up short. Turns out the solution is insanely simple.

The following is a direct quote from from the excellent ArchWiki. I tried it in Ubuntu Maverick and it works.

Obm-xdg

obm-xdg is a command-line tool that comes with Obmenu. It can generate a categorized sub-menu of installed GTK/GNOME applications.

To use obm-xdg, add the following line to ~/.config/openbox/menu.xml:

{menu execute="obm-xdg" id="xdg-menu" label="xdg"/}

(note: the curly brackets above should actually be angled brackets, but this crazy Blogger interface makes it close to impossible to write the above with angled brackets.)

Then run openbox --reconfigure to refresh the Openbox menu. You should now see a sub-menu labeled xdg in your menu.

Note: If you do not have GNOME installed, then you need to install gnome-menus package for obm-xdg to work.

Update: This is having issues on Squeeze. More later as I (if I) figure it out.

February 15, 2010

Karmic, openbox, and messed up desktop numbers (SOLVED)

I think it started after I upgraded to Karmic. When logging into an openbox session, the number of desktops I was getting was equal to one ... no matter what I set the number to during the previous session. Herein I describe a fix.

The script that gets called when GDM starts up an openbox session is /usr/bin/openbox-session. It just so happens that before I upgraded to Karmic, I had created a new script in /usr/local/bin/skinnydebbie-session that was a copy of the Jaunty version of /usr/bin/openbox-session with a few changes in the config files called. The interesting thing was that after the Karmic upgrade I did not have the wrong-number-of-desktops problem when starting from /usr/local/bin/skinnydebbie-session.; it only manifested itself when starting from /usr/bin/openbox-session. A quick comparison of the two files revealed a fix. At the top of my /usr/local/bin/skinnydebbie-session is the following snippet of code which I am sure was inherited from the Jaunty version of /usr/bin/openbox-session and was probably left off the Karmic version:

# Clean up after GDM
xprop -root -remove _NET_NUMBER_OF_DESKTOPS \
      -remove _NET_DESKTOP_NAMES \
      -remove _NET_CURRENT_DESKTOP 2> /dev/null

I added this snippet to my ~/.config/openbox/autostart.sh and voila! I get the right number of desktops. I am pretty sure it would work if I added it to /usr/bin/openbox-session instead.

This should probably be a bug report, but I'm feeling a bit too lazy now to do it.