Monday, May 2, 2011

Using a custom window manager with Gnome / Ubuntu 11.04

I kinda expected that the upgrade to Natty Narwhal would be a bit bumpy, but it was pretty painless. Really all I use GNOME for is a way to get a system tray into my XMonad session with the least possible fuss. I also use a few GTK+Gnome oriented apps like evince and geeqie but have no real connexion to the old Gnome.


The only real bump that I have faced, is that overriding WINDOW_MANAGER and calling gnome-session is no longer enough to run GNOME with XMonad. Ubuntu 11.04 as of current update status, is overwriting this with compiz! Not even overriding the gconf key helps, it just gets reset to gnome-wm; which is what is *supposed* to be picking up the exported WINDOW_MANAGER variable from my X session file.

Solution? Found a helpful hint on the XMonad wiki. However rather than modify things at the system level (I am a BSD lover after all), I opted to instead setup a session file in $XDG_CONFIG_HOME/gnome-session/sessions/$LOGNAME.session. The default value for $XDG_CONFIG_HOME is ~/.config, $LOGNAME is another variable for $USER (your users' login name).


[ terry@alice ]$ cat ~/.config/gnome-session/sessions/terry.session
[GNOME Session]
Name=Classic GNOME
Required=windowmanager;panel;filemanager;
Required-windowmanager=gnome-wm
Required-panel=gnome-panel
Required-filemanager=nautilus
DefaultApps=gnome-settings-daemon;
[ terry@alice ]$



Then updated my X session to run this with commit 3e92fc91040573ba40ac20ad75a594d6eeef60b6. And for good measure, I unset the gconf key.


Now everything worky :-)

No comments:

Post a Comment