Make Openbox your window manager in Ubuntu

Autumn is here, it’s time to change our wallpaper! And our distro as well… Today we’ll see how to tweak Lubuntu, the lightest and simplest of the *buntu releases to make it run smoother than ever and look a bit nicer.

To do that we’ll use the Openbox window manager, a highly configurable WM that “allows you to change almost every aspect of how you interact with your desktop and invent completely new ways to use and control it.” I’ve already mentioned it a few time on this blog, while doing some testing on the brilliant Crunchbang Debian distribution. And as the spiritual successor of Crunchbang, BunsenLabs, is about to be launched, it seems an excellent timing to have a new look at Openbox.

With a fresh Lubuntu install, begin with installing the following components (all in the official Ubuntu repos):

  • openbox (obmenu, obconf…)
  • tint2: your taskbar
  • lxappearance: already installed on Lubuntu, to change the GTK settings
  • nitrogen: your wallpaper manager
  • compton: a compositor fo X11, to add shadows and avoid tearing
  • conky: a configurable system monitor
  • geany: a better text editor than the default Leafpad on Lubuntu

Logout and at the login screen select Openbox as your new session.

At your first start you’ll be welcomed by a dark empty desktop, no icons, no panel. Welcome to Openbox! Enjoy its simplicity : right-click on the desktop to open the main menuto access the few programs available by default in the menu. Use the terminal to launch anything else : Openbox is a window manager system that will only provide for the appearance and placement of the containers (‘windows’). Everything else will have to be handled by other program or scripts, as minimalist and highly configurable as Openbox.

All the configuration files mentioned in the post are available in my Github repo:

Let’s start by making the desktop friendly.

openbox_ubuntuBasic appearance

Start Nitrogen through the terminal (just enter nitrogen), select a folder containing pictures, chose your wallpaper and apply.

Start LxAppearance (terminal: lxappearance) and apply a better suiting GTK theme, Openbox theme, icons, and configure your fonts. You’ll find at the end of the post the names and links for the themes showed in the screenshots.

If the font hinting is not correctly applied, create an .Xresources file with these lines:

geany ~/.Xresources
Xft.dpi:        96
Xft.antialias:  true
Xft.hinting:    true
Xft.rgba:       rgb
Xft.hintstyle:  hintslight


The autostart file manages all the programs run at system start. Copy it from the source to your configuration folder, then edit it to add everything you need:

cp /etc/xdg/openbox/autostart ~/.config/openbox/
geany ~/.config/openbox/autostart

In this example we’ll add here Nitrogen to display a wallpaper, tint2 and conky (panel and infos, which we’ll both configure later), and compton for compositing. Once Autostart is configured, exit your session to check everything works fine (right-click > Exit).

# Startup programs
# ~/.config/openbox/autostart
nitrogen --restore &
tint2 &
compton --config ~/.config/compton.conf &
sleep 1 && 
conky -c ~/.config/.conkywine &

Let’s now configure everything.


Compton is a light and efficient compositor manager, used to apply transition effects to your windows, shadows… and get rid of tearing while watching videos. Once again, no GUI to configure it, you’ll need to explore and edit a text file. Create a compton.conf textfile and edit it to your likings.

geany ~/.config/compton.conf

Tint2 panel

Tint2 is – surprise! – a highly configurable panel that will display taskbar, program launchers, notification area and such. The default look is quite aweful, but fun to modify and modernize. Edit the panel:

geany ~/.config/tint2/tint2rc
  • Use this nice model by Utotu if you need guidance and don’t want to create it from scratch: BunsenLabs.
  • Here everything you need to know about Tint2 config: Tint2.

Restart tint2 after any modification to see the result: enter pkill tint2 && tint2 & on your terminal to do so. My Tint2 is a dark icon only panel, with desaturated icons on the launcher as well as the taskbar. I use the Faenza iconset, which goes nicely with the square nature of the panel.



Optional part. Conky displays information on your desktop (every kind of info you would like to display: time, resources, heat, weather, text etc.). Find here everything you need to configure it, and a few examples. I currently use a thin simple inline display of basic information.

Openbox Shortcuts & Dmenu

Shortuts in Openbox are managed in the rc.xml file (~/.config/openbox/rc.xml), once again open, edit, save and restart the session:

geany ~/.config/openbox/rc.xml

While we are in the shortcut section, let’s add a Dmenu key. Remember Dmenu? The fastest and simplest of the program launchers. Install program and fonts.

sudo apt-get install suckless-tools xfonts-terminus

Enter dmenu_run in a terminal to see what it looks like. You can modify the appearance, fonts & colors. To do so, the simplest way is to create a script that will execute Dmenu with the right options. With the following action we are :

  • Creating a script file in the .config folder
  • Editing it with colors and fonts
  • Making it executable
geany ~/.config/
dmenu_run -fn "-*-clean-*-*-*-*-*-*-*-*-*-*-*-*" -p "Program :" -nb '#2D2D2D' -nf '#ffffff' -sf '#000000' -sb '#00A7FC'
chmod +x ~/.config/

You now have a working script: test it in your terminal by entering sh ~/.config/ Let’s bind the script to a shortcut in the <keyboard> section of the rc.xml file. I applied alt-space to the Dmenu launcher.

<!-- Keybindings for dmenu -->
 <keybind key="A-space">
  <action name="Execute">

Advance appearance

GTK and OBtheme: I kind of riped-off the GTK and OpenBox theme created for BunsenLabs, the successor of Crunchbang. The theme is grey modern looking, quite similar in my opinion to the Greybird theme. Polished and efficient. I modified colors & roundness to match this month’s autumn theming.

  • Sources for the GTK and OB themes are on the BL Github
  • My forked version is on my Github.

Iconsets: Faenza or Moka

Fonts I would recommend:

  • Droid Sans for a classic minimal desktop
  • Liberation Mono or Code Source Pro as your terminal mono font
  • Coda, if your looking for a square futurist font (bold is ugly though…)

Bashrc prompt colors:

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\A \[\033[01;32m\]> \u \[\033[01;34m\]\w \[\033[01;32m\]> \[\033[00m\]'
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '

Help yourself with this cool online tool to get your prompt right: BashrcGenerator.

Login screen: modify your Lightdm login screen to match your gtk theming, wallpaper and iconset:

sudo lightdm-gtk-greeter-setting


Other tools

And of course you’ll need some classic tools to make it a perfect desktop:

Vim, as text editor

Terminator, a more consistent terminal with color schemes support.


Comments are closed.

Create a free website or blog at

Up ↑