Skip to content

Instantly share code, notes, and snippets.

@Tarrasch
Last active September 12, 2016 18:14
Show Gist options
  • Save Tarrasch/3156991 to your computer and use it in GitHub Desktop.
Save Tarrasch/3156991 to your computer and use it in GitHub Desktop.
Unity plus xmonad configuration (Ubuntu 12.04)

What

This is my xmonad+unity panel config. With this config, you'll have a well integrated panel from unity but still have xmonad as your window manager with your gnome apps, including the pretty gnome-terminal (for those too lazy to learn xmoobar).

This config doesn't have the unity launcher, mainly becuse it causes windows to be unfloatable, besides I'm not fond of it anymore.

How

Copy and paste these lines (or understand what it does and do it manually).

sudo echo "We do this so subsequent sudos don't ask for password"
GISTDIR='https://gist.githubusercontent.com/Tarrasch/3156991/raw'
mv ~/.xinitrc{,.backup}
curl "$GISTDIR/xinitrc"              |      tee ~/.xinitrc
curl "$GISTDIR/xmonad.session"       | sudo tee /usr/share/gnome-session/sessions/xmonad.session
curl "$GISTDIR/gnome-xmonad.desktop" | sudo tee /usr/share/xsessions/gnome-xmonad.desktop

Then log out and choose the custom login session (not the xmonad one, we want it to read from the .xinitrc)

Thanks to

Others gisters who basically did what I did, but I created a nice readme.

[Desktop Entry]
Name=GNOME with Xmonad
Comment=A GNOME fallback mode session using xmonad as the window manager.
Exec=gnome-session-xmonad
TryExec=gnome-session
Icon=
Type=Application
#! /bin/sh
exec gnome-session --session xmonad "$@"
[GNOME Session]
Name=Xmonad/Unity
RequiredComponents=gnome-settings-daemon;
RequiredProviders=windowmanager;panel;
DefaultProvider-windowmanager=xmonad
DefaultProvider-panel=unity-2d-panel
@sheldond
Copy link

Okay, my problem was not having xmonad setup with gnome config, e.g.: http://www.haskell.org/haskellwiki/Xmonad/Using_xmonad_in_Gnome#Ubuntu_Precise

I'm now using Lubuntu (trying to go lightweight as possible) with xmonad and gnome-panel (so I can use global menu, which I couldn't get working in lxpanel or xfce's panel).

@Tarrasch
Copy link
Author

@sheldond, I don't think this will ever work for 12.10 as unity-2d (and in particular unity-2d-panel) doesn't exist for it. This was a conscious decision from Canonical. I think the idea was that they'll make the "3d" version even more lightweight and there is no need for a lightweight 2d version. Unfortunately for us, unity-3d is a window manager which means xmonad will never be able to coexist with it.

It seems however that you're okay with a non-unity solution. If somebody is willing to create/dig up a gist like this but for 12.10, please let me know (and use @ on me) so I can update this gist with a link to it. The reason why I haven't done it myself so far is simply because I'm still using 12.04.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment