Dedicated to my late brave, beautiful and silly mummy, Debra Ross. I love you mumster.

Skip navigation

Fun with Xfce part 4: Using Openbox

What started as a mini series on the Xfce Desktop Environment on my university intranet has evolved into an open ended exploration on my public blog, and I’m having lots of fun doing it! Scroll down to the end of this post to view links to the previous posts in the series.

Part of the Xfce desktop environment is Xfwm, the Xfce window manager. Xfwm provides sophisticated and pretty composting effects such as drop shadows and alpha transparency on windows and menus, while still using less memory and power than competing desktop window managers. Despite this, for much slower machines even Xfwm can be overkill.

ASIDE: "Window managers" draw the widgets, title bars, resize handles and other elements onto application windows. "Desktop environments" such as KDE, GNOME and Xfce bundle their own window managers along with software developed specifically for their environments, such as Thunar for Xfce.

Enter Openbox, again! Openbox is an extensible, standards compliant, very minimalistic window manager that can be used by itself or in place of a desktop environment’s default window manager to further reduce memory and processor resources. The separate obconf utility provides a nice graphical control panel you can use to switch themes and adjust settings.

The Obconf window and Xfce Settings menu entry
Openbox running in Xfce with the bundled "Mikachu" theme

Most reputable package managers carry both Openbox and obconf, check your distribution’s repositories. To install them on my favourite BSD flavours for example:

FreeBSD ports system or package
# cd /usr/ports/x11-wm/openbox && make install clean
# cd /usr/ports/x11-wm/obconf && make install clean
or:
# pkg_add -rv openbox
# pkg_add -rv obconf

NetBSD pkgsrc
# cd /usr/pkgsrc/wm/openbox && make install clean clean-depends
# cd /usr/pkgsrc/wm/obconf && make install clean clean-depends

Now we want to kill the active Xfwm process in Xfce and open our glorious Openbox replacement. Fire up your Terminal and enter:

% killall xfwm4 ; openbox & exit

It really is smaller in every sense of the word isn’t it? To make sure Openbox is used by default whenever you start Xfce, quit Xfce and check "Save sessions for future login".

The Obconf window and Xfce Settings menu entry
Don’t worry, CC looks pretty confused herself!

You’ll also notice that the "Openbox Configuration Manager" has added itself to the Xfce Settings menu! Click on it and have fun with all the different themes, button positions, font sizes and arrangement settings.

Related posts

Sleek Openbox in KDE on FreeBSD

We all readily admit that KDE is the greatest desktop environment ever developed for BSD, Linux, Solaris and other Unix-like operating systems, but that’s not to say it can be improved by, or complimented with, other software.

ASIDE: Some people may not agree with my statement that KDE is the greatest desktop environment ever developed for Unix-like operating systems. I readily admit that Xfce is also very nice, especially when you’re using lots of GTK+ applications.

If you’re a GNOME person, well I guess we can’t all be perfect ;-)

Case in point, the Openbox window manager. Window managers draw the widgets, title bars, resize handles and other elements onto application windows. Desktop environments such as KDE, GNOME or Xfce bundle their own window managers along with software developed specifically for their environments, such as Konqueror for KDE.

Despite this bundling, it it is possible to replace the default window manager with one that you choose. You may do this to reduce memory usage, change functionality, or even just for a different visual style.

Openbox running in KDE (with Amarok listening to Whole Wheat Radio!)
Openbox running in KDE (with Amarok listening to Whole Wheat Radio!)

To use Openbox instead of Kwin in KDE on a FreeBSD (or similarly configured) machine:

  1. Update your ports tree, then
    cd /usr/ports/x11-wm/openbox/ && make install clean.
    Alternatively, just install the package with pkg_add -rv openbox
  2. Open the .xinitrc config file in your home directory
  3. Comment out # exec startkde (add a pound sign / hash)
  4. Add exec openbox-kde-session

For NetBSD, you’ll want to update pkgsrc then /usr/pkgsrc/wm/openbox/ && make install clean clean-depends instead in step 1.

To make it easier to change visual themes, the layout of the widgets and so forth, you might also want to install the ObConf tool which is also available in FreeBSD Ports and in NetBSD’s pkgsrc.