Blackbox on Mac OS X

Blackbox is a lightweight X11 window manager I used to use when I used linux as my main OS. The only UI elements on display by default is a small bar down the bottom to control what workspace you are using (called the "slit") and you can launch programs and configure blackbox from a menu visible when you right click the desktop:

It's quite nice to use something so uncluttered after the colourful noisy UIs I'm used to, so I figured I'd see if it's possible to use it under OS X and share the steps involved.

As a prerequisite make sure you have XQuartz installed as well as either Xcode or the Command Line Tools for Xcode. To get a working copy of blackbox you can either use MacPorts or build it from source by hand:

1a. MacPorts (easy)

First install macports, and open up a terminal window and enter the following

   $ sudo port install blackbox   

All the requisite dependencies should be downloaded for you and once it's complete you should have a functional blackbox binary installed in your system.

1b. Build by hand (less easy)

You'll likely need to download and install the following, as they're not provided by default in OS X (well one version of libtool is, but it's not what you want. To prevent overwriting this we'll use --prefix=/usr/local). I hacked together a script you can just copy + paste into your terminal (you'll need to enter your password to allow the `sudo make install` step to work.

Next grab the blackbox sources:

 $ cvs login </br>   
 $ cvs -z3 co blackbox   
 $ aclocal & autoheader && automake && autoreconf -i 
And do the standard ./configure && make && sudo make install malarkey. I ran into an odd error during ./configure where something to do with xft was dying. Running with -disable-xft didn't help, so I opted to skip it from the build by hand - you can do this by downloading this patch...

and then applying it + building:

 $ patch -P0 < fix_xft.patch 
 $ ./configure   
 $ make   
 $ sudo make install 

2. Configuration

By now you should have a working blackbox binary in /usr/local/bin. Now create an .xinitrc

 $ cat << END > ~/.xinitrc   
 export PATH   xterm &   
 exec /usr/local/bin/blackbox   

3. Launch!

Open up XQuartz, go to Preferences and tick the "Full-screen mode" box, and on your keyboard hit ⌘-⌥-a (press and hold command, option and "a") and you'll see a lovely blackbox desktop. You can use the same sequence to switch back out of XQuartz and see your OS X desktop again.