Xmonad on Karmic Koala

Xmonad is a tiling window manager that wastes neither time nor screen real estate. It does away with decorations, giving windows the space they need, but no more. The learning curve is a steep eight commands or so.

This tutorial should get you up to speed quickly with Xmonad on Ubuntu 9.10 Karmic Koala.

Several tiled and a floating window

You will be changing your window manager, which is a major part of your graphical user interface, where it’s far easier to get yourself into a mess than get yourself out. If that scares you or loosing all your data doesn’t sound like fun, then this may not be for you.

You may want to download the config files and read through the entire tutorial first. If you lack the luxury of two computers, I recommend printing this page out. Remember Ctrl-Alt-F1 through F6 are your terminal friends.

Get Xmonad 0.9

$ sudo add-apt-repository ppa:justinbogner/ppa
$ sudo apt-get update
$ sudo apt-get install xmonad libghc6-xmonad-dev libghc6-xmonad-contrib-dev dwm-tools feh

Set the Gnome window manager

Set to xmonad after printing the old windowmanager:
$ gconftool-2 -g /desktop/gnome/session/required_components/windowmanager
$ gconftool-2 -s /desktop/gnome/session/required_components/windowmanager xmonad --type string

Karmic Koala comes preinstalled with a /usr/share/applications/xmonad.desktop file that should work just fine, though Haskellwiki recommends that X-GNOME-Autostart-Notify is set to false (I’ve noticed no difference either way).

Xmonad.start

You will have to change a single line of a different xmonad.desktop file. The Exec in /usr/share/xsessions/xmonad.desktop must be xmonad.start rather than just xmonad. Download this file or make the Exec change manually.

Download /usr/local/bin/xmonad.start and make sure it is executable.
$ sudo chmod +x /usr/local/bin/xmonad.start

Xmonad config header

Download and by all means customize ~/.xmonad/xmonad.hs . I changed the mod key from Left-Alt to the Left-Win key (mod4Mask).

Be sure to compile/link the header with:
$ ghci ~/.xmonad/xmonad.hs

If all runs OK, you can quit with a preceding colon:
Prelude Main> :quit

Xmobar

Download the optional ~/.xmobarrc for Xmobar (a text based quick launcher with other candy).

Finishing touches

I killed the default Ubuntu bottom panel (right click ‘Delete this panel’) because Xmonad has it’s own workspaces, makes the taskbar redundant, and makes cleaning the desktop unnecessary. Further I hide the top panel (right click “Properties” autohide) so that full screen lives up to the name.

You may get away with logging into a Gnome session, otherwise, set Session to XMonad (under the login prompt). Though the latter is probably optimal, it does require you to set your background image again, if you so desire. Just uncomment and modify the “feh --bg-scale” line of /usr/local/bin/xmonad.start.

Necessary reading

The configuration above is a mix and match from these four pages and my own seasonings.

I highly recommend this short tutorial (note that my configuration uses the Left-Win mod key rather than Alt mod key). Ten minutes later, you can check out the tiny manual.