0

I like to use the GNOME desktop, but I prefer to replace its window manager with openbox, with 4 workspaces. However, when I run openbox --replace, the number of workspaces available drops to 1. If I go into obconf, workspaces is still configured to be 4 (~/.config/openbox/rc.xml shows the same). I can get the workspaces to reappear by changing the value in obconf to anything else, and then back to 4.

I have just been dealing with this problem since Ubuntu 9.04 (now up to 10.10) since I don't reboot very often. But it's really annoying to have to reset my workspaces whenever I do have to reboot. Changing the value in rc.xml and running openbox --reconfigure does not seem to have any effect. So what is obconf doing that I'm not (sends a dbus message perhaps [EDIT: watching with dbus-monitor I see no messages when changing the workspaces value in obconf])?

I was hoping there would be a cleaner way to change the window manager than just running openbox --replace at login. So my questions are:

  1. Is there a better way to specify an alternate window manager (i.e. a way that doesn't cause the workspaces to break)?
  2. If not, how can I automatically set the number of workspaces back to 4?

Update:

I finally got around to trying what I commented on MrShunz's answer (adding WINDOW_MANAGER=/usr/bin/openbox to ~/.gnomerc). But the effect is the same as openbox --replace.

Another Update (in response to geekosaur):

When running xprop -root -spy I see this (among other values):

_NET_NUMBER_OF_DESKTOPS(CARDINAL) = 1
_NET_DESKTOP_NAMES(UTF8_STRING) = 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x31, 0x0

But I suppose that makes sense, because when I start openbox from a terminal, it says this:

Openbox-WARNING **: Openbox is configured for 4 desktops, but the current session has 1.  Overriding the Openbox configuration.

But that is a lie, because metacity, which is the active window manager when openbox takes over, is configured for four desktops.

4 Answers 4

1

Another workaround: starting odconf and adjusting the number of workspaces brings the workspaces back as well.

0

Well, you can try configuring as you like it to work and then saving the session as it's suggested here.

1
  • That is how I set it up (openbox --replace and then saved the session). But whenever I log in, I only have one workspace. I'll have to try post #5 on that page, though, which is adding export WINDOW_MANAGER=/usr/bin/openbox to ~/.gnomerc.
    – Brian
    Dec 13, 2010 at 14:48
0

I'd be interested in seeing output from xprop -root -spy | grep --line-buffered _NET_ when you start OpenBox; my guess is it's not placing the right _NET_NUMBER_OF_DESKTOPS and/or _NET_DESKTOP_NAMES atoms on the root window at startup, and changing the setting causes it to put the right values there. If so, you'll want to file that as a bug against OpenBox.

2
  • Updated my question
    – Brian
    Mar 23, 2011 at 3:15
  • @Brian, I think you just confirmed my suspicion. I would, however, guess that Metacity removes its desktop definitions when it exits, so OpenBox tries to initialize, finds nothing, and defaults to a single desktop. This is more of an OpenBox question, though; you should file a bug report with them.
    – geekosaur
    Mar 23, 2011 at 3:23
0

Finally stumbled upon a work-around for this. Instead of running openbox --replace at startup, I run a script with the following:

openbox --replace &
metacity --replace &
openbox --replace &

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .