Unity+XMonad in Ubuntu 11.10 Oneiric
I love XMonad. For years I’ve been using it inside Gnome 2, but with the release of Ubuntu 11.10 Oneiric, Gnome 2 is on the way out, and Unity is the way forward. Here’s how to run XMonad with Unity-2D:
1) Install XMonad. Open a terminal and enter
sudo apt-get install xmonad
2) Configure XMonad to interact happily with unity. This involves floating the laucher over the top of the active window, and not trying to tile the top panel.
Make a file ~/.xmonad/xmonad.hs, and put in it:
import XMonad
import XMonad.Config.Gnome
myManageHook = composeAll (
[ manageHook gnomeConfig
, className =? "Unity-2d-panel" --> doIgnore
, className =? "Unity-2d-launcher" --> doFloat
])
main = xmonad gnomeConfig { manageHook = myManageHook }
3) Compile this config file in the terminal
xmonad --recompile
4) Tie it all together with an alternative “XMonad Unity” XSession.
Make a file /usr/share/gnome-session/sessions/xmonad.session with these lines:
[GNOME Session]
Name=Xmonad Unity
RequiredComponents=gnome-settings-daemon;
RequiredProviders=windowmanager;panel;launcher;
DefaultProvider-windowmanager=xmonad
DefaultProvider-panel=unity-2d-panel
DefaultProvider-launcher=unity-2d-launcher
Make a file /usr/share/xsessions/xmonad-unity-session.desktop with these lines:
[Desktop Entry]
Name=XMonad Unity
Comment=Tiling window manager
TryExec=/usr/bin/gnome-session
Exec=gnome-session --session=xmonad
Type=XSession
And you’re done! Logout, and log back in, selecting the “XMonad Unity” session. The Unity panel and launcher will happily coexist with XMonad. Choice!