Xmonad and Gnome 3

The upgrade to Gnome3 in ArchLinux a few days ago broke my previous setup that combined xmonad with Gnome. Gnome 3 has a fallback mode, but I found that the instructions for replacing metacity under Gnome 2 no longer worked. With some help from the xmonad mailing list (in particular Jens Petersen and his efforts of providing a working setup on Fedora) I now finally have a working setup again. Here’s how I did it.

Add a session file for use by Gnome Session (/usr/share/gnome-session/sessions/xmonad.session):

[GNOME Session]
Name=Xmonad session

And a desktop file for GDM (/usr/share/xsessions/xmonad-gnome-session.desktop):

[Desktop Entry]
Name=Xmonad GNOME
Comment=Tiling window manager
Exec=gnome-session --session=xmonad

That’s all it takes. Of course I’ve raised a ticket against the Arch package.



  1. Thanks for notes I want to use Xmonad+Gnome3 on Pardus and I edit this changes on my system and on Login Screen I choose Xmonad+Gnome and I want to login but this message shown to screen.

    “failed to load xmonad session”

    How to solve this problem?

    Best Regars

  2. I’ve actually stopped using Xmonad since I wrote this. Soon after Gnome 3 was released I started looking around for alternatives to Gnome in the Gnome+Xmonad combo. Nothing seemed to really suit me though so I decided to give the Gnome Shell a serious chance instead. I’ve gotten to the point where it’s very usable and hence I don’t use the setup I describe in this post myself.

  3. Oddly, this worked on one of my Ubuntu 11.10 machines but not the other. The error I’m getting on the other is ‘Failed to load session “xmonad”‘, and I can’t figure out the difference between the machines.

  4. I was having the [failed to load session "xmonad"] issue. I fixed it by running “sudo apt-get install gnome-panel” and modifying the xmonad.session file as follows:

    /usr/share/gnome-session/sessions/xmonad.session [GNOME Session] Name=Xmonad session RequiredComponents=gnome-panel;gnome-settings-daemon; RequiredProviders=windowmanager DefaultProvider-windowmanager=xmonad

    I tried using Gnome 3, but it’s a little clunky for my computer and xmonad makes using workspaces a zillion times more efficient.

  5. I was getting failed to load session "xmonad" because I did not have the notification-daemon installed. To install the notification-daemon on Ubuntu 11.10 I used:

    sudo apt-get install notification-daemon
  6. Like it says on the Xmonad GNOME wiki page, I also needed the applications/xmonad.desktop file. This made the failed to load session "xmonad" message disappear, however I’m still trying to get stuff to work just right.

    $ cat /usr/share/applications/xmonad.desktop
    [Desktop Entry]
  7. Ah yup, the Arch Linux wiki also states the same thing that I mentioned in my previous comment. Also, as mentioned in the Xmonad wiki, I had to have my ~/.xmonad/xmonad.hs config as

    import XMonad
    import XMonad.Config.Gnome
    main = xmonad gnomeConfig

    (this requires the xmonad-contrib package on Arch Linux). Now GNOME panel shows up just fine, along with a list of workspaces. I guess it shouldn’t be too hard from here.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>