Openbox: A fun and lightweight window manager

What to run on Openbox startup

You’re going to want a few things to run on startup, most likely, and this is another area in which Blackbox and Fluxbox users will feel at home. Openbox uses the system autostart, located in /etc/xdg/openbox by default, if there isn’t one in your profile (and there isn’t, unless you put one there). You can start with the default one (which I thought was a bit much) by copying that one, or just start with a blank file called “”, put it in /~/.config/openbox, and make sure it has this at the top:

# Run the system-wide support stuff

Add items you want to start up after that line, and for things you want to keep running, you of course need to follow each line with an ampersand (“&”).

My Openbox is very similar to my Fluxbox startup file, but I did encounter some weirdness that needed some attention, and I’ll get to that in a minute.

First, here’s what my Openbox /~/.config/openbox/ looks like:

# Run the system-wide support stuff

# Programs to launch at startup
fbsetbg -r /home/trent/files/wallpaper/random
nm-applet &
xscreensaver -no-splash &
gnome-power-manager &
alsactl restore

# Load dockapps
(sleep 4 && wmcpuload -bl -lc blue) &
(sleep 4 && wmnetload -bl -lc blue) &
(sleep 6 && wmmemload -bl -lc blue) &
(sleep 7 && wmix) &
(sleep 7 && wmweather) &
(sleep 7 && wmacpi) &

# Programs that will run after Openbox has started
(sleep 2 && lxpanel) &
(sleep 2 && synergyc -f &

And before you start scratching your head, allow me to explain some of this.

The first line is just to set a random wallpaper out of a local folder in which I have about a bazillion wallpaper images. Fluxbox users will recognize fbsetbg as a handy wallpaper setting utility for Fluxbox; since I already had it on-hand on this laptop, and since it works just fine in Openbox as well, I utilize the same method here as I do in Fluxbox to set my wallpaper image.

Next is nm-applet, being of course the network manager that I already have on Ubuntu. This is so that it starts the wifi stack and I can communicate with the network.

Next of course is my screensaver daemon, and gnome-power-manager should be self-explanatory. I don’t like my touchpad enabled by default on my laptop, so I call the shell script I wrote to get around this annoying behavior a few weeks ago, so that it toggles the touchpad off on startup. The next line restores my sound levels to where I prefer them to be.

My dockapps were a completely different story. I found that I couldn’t just load them one after another in Openbox’s autostart like I could in Fluxbox. Doing so caused odd, random behavior for which I have only a limited explanation… I think for whatever reason, there needs to be a significant delay between the loading of each one of these dockapps, or they interfere with each other. Doing it without the “sleep” portion of each of those lines caused them to load in random orders, or sometimes just skipped entirely. This baffling behavior puzzled me for a couple of days. Finally, after experimenting with a variety of approaches and “sleep” values, I struck success with the above combination. Believe me when I say, any deviation from the way I have the dockapps section above causes things to not work correctly.

After my dockapps are started, I start LXPanel, which some of you may recognize as the default toolbar for LXDE. I chose this because I like to have a toolbar in my window manager (if nothing else to show me what windows I have open on any given desktop) and I actually like how LXPanel looks a lot more than one of the others I tried, one called fbpanel. LXPanel, like many elements in LXDE, can be run quite easily as a standalone app, and it works pretty well as a toolbar for Openbox.

The last line starts up the Synergy client on my laptop so that when I have it running next to my desktop machine, I can easily work back and forth without switching to the laptop keyboard and mouse.

Next page: Theming and other configuration, Openbox pros and cons

9 thoughts on “Openbox: A fun and lightweight window manager

  1. Pingback: » Blog Archive » K Desktop Environment Has Summit, GNOME Has New Journal, Other Desktop Options Debated
  2. Pingback: Links 09/09/2009 (9/9/9): Debian switches to Upstart, Palm introduces Pré junior | Boycott Novell
  3. Pingback: Dan Serban (allsystemsarego) 's status on Thursday, 10-Sep-09 09:16:06 UTC -
  4. Try tint2 as a panel with openbox. It doesn’t have a tray so if you want one, you might need docky which sits in your dock area.

  5. Pingback: GoblinX Project » GoblinX Newsletter, Issue 217 (09/13/2009)
  6. Pingback: How to make Peppermint OS even faster with Openbox « The Linux Critic
  7. Pingback: Openbox window manager | maurizio siagri

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s