Thursday, October 28, 2010

Installing XMonad on Ubuntu 10.10 Maverick Meerkat

I installed Ubuntu 10.10 Maverick Meerkat (in Parallels on my Mac) to try out XMonad, the tiling window manager. XMonad is a candidate if I move off the Mac. I am slowly increasing my keyboard use and relying less on the mouse and XMonad is a further step in that direction.

I have never installed or used Xmonad before and after too much time stuffing around with the usual linux problems, these are the steps I followed to get a simple, initial installation working on a fresh install of Ubuntu.

  1. Install Haskell, XMonad and dmenu.
    $ sudo apt-get install haskell-platform xmonad dwm-tools

    Originally, I installed Haskell and then tried to install XMonad via Cabal. Unfortunately the xmonad-contrib package failed to install due to dependency issues.

  2. Set XMonad to be the window manager for Gnome.
    $ gconftool-2 -s /desktop/gnome/session/required_components/windowmanager xmonad --type string

    Found this at Xmonad/Using xmonad in Gnome. Don't log out or restart X now. If you do, you will find XMonad workspace 1 broken. It seems to consist of two Gnome panels tiled to fill the screen but hidden behind the desktop and any further windows you create are also hidden. The next step fixes this.

  3. Create a simple Xmonad configuration file.
    $ mkdir ~/.xmonad
    $ touch ~/.xmonad/xmonad.hs

    Set the contents of xmonad.hs to
    import XMonad
    import XMonad.Hooks.ManageDocks

    main = xmonad $ defaultConfig {
    manageHook = manageDocks <+> manageHook defaultConfig,
    layoutHook = avoidStruts $ layoutHook defaultConfig
    }

    Apply the configuration.
    $ xmonad --recompile

    This configuration was found at Xmonad/Config archive/John Goerzen's Configuration.

  4. Logout and back in again. You should see a standard looking Ubuntu desktop with the menubar across the top and the normal panel along the bottom. See the tour to get started with the XMonad commands.

3 comments:

Shannon -jj Behrens said...

You're the first hit on Google for "ubuntu 10.10 xmonad". Thanks a lot for helping me get started quickly ;)

முத்துவேல் said...

Error detected while loading xmonad configuration file: /root/.xmonad/xmonad.hs

xmonad.hs:2:7:
Could not find module `XMonad.Hooks.ManageDocks':
Use -v to see a list of the files searched for.

Please check the file for errors.

I am getting the above error. Any idea how to get over it

Brad Clow said...

Sorry, haven't used XMonad for quite some time now.