[Xmonad] Re: How to combine xmonad with Ubuntu?

Michael F. Lamb mike at datagrok.org
Tue Sep 11 13:26:22 EDT 2007

Kai Grossjohann wrote:
> On Mon, Sep 10, 2007 at 02:59:18PM -0400, Geoffrey Alan Washburn wrote:
>> I have found that including "gnome-settings-daemon" and 
>> "gnome-power-manager" in ~/.xinitrc will allow me to retain unobtrusive 
>> notifications concerning m laptop's battery.  I think starting 
>> "update-notifier" will also present you with notifications concerning 
>> updates, but I have not been able to test this yet.
> This is interesting.  Perhaps I could log in via Gnome and take a
> snapshot of all processes, then compare with the xmonad login.
> I had been thinking of the opposite route: Keep the normal Gnome session
> but just replace the window manager.  (Gnome has a setting that says
> which WM to run.)  I'm not sure how that will pan out.

How has it panned out?

If it doesn't work, here's my experience doing similar things. I'm 
running Debian, so details below might be similar for Ubuntu.

When I'm running xmonad or dwm, I typically launch the stuff that 
'gnome-session' does from my .xsession file, and I choose "Launch 
Xclient script" in gdm. That seems to be the easiest way. Until now, 
I've stuck to 'gnome-settings-daemon' (for fonts and desktop background) 
and 'gnome-volume-manager' (to enable automounting USB drives), and some 
other things preceding xmonad in my .xsession file. Thanks to Geoffrey 
for pointing out 'gnome-power-manager', I may be adding that to my 
.xsession... :)

For kicks I tried looking around now to discover just what is actually 
launched in a normal gnome session. It's a bit labyrinthine, but the man 
pages are adequate and I've made some progress. Maybe you can start with 
this and come up with the definitive answer, which I am far too lazy to 

Starting with 'man gdm', we're led to '/etc/gdm/gdm.conf', from there to 
'/usr/share/gdm/defaults.conf', which states where session files live.

One of those session files, '/usr/share/xsessions/gnome.desktop', shows 
that for "Gnome", gdm runs 'gnome-session'. That program manages the 
various others. I think gdm actually does some other work including 
launching ssh-agent as a parent process, you'll have to go spelunking 
through /etc/X11/Xsession* to figure that out. (I did once before and 
I've forgotten it now.)

Onward, 'man gnome-session' and 'man default.session' point to 
'/usr/share/gnome/default.session', which contains on my system 
references to 'gnome-wm', 'gnome-panel', 'nautilus', and others.

I expect that gnome-panel launches your network status app itself. I 
don't much like gnome-panel, so I have little experience making it work 
with xmonad. Trying it now, it starts tiled, not floating, and does not 
repaint itself properly. I had to adjust its "height" in its 
configuration tabs to make it do so. Just to obtain a tray utility, I 
think I'd go for the 'trayer' app previously mentioned by Alec, and 
launch applets from a script.

Nautilus manages desktop icons. I don't like desktop icons, but I do 
like the nautilus file manager, so I use gconf-editor to uncheck 
/apps/nautilus/preferences/show_desktop, and I don't launch it from my 

'gnome-wm' is supposed to obey the environment variable WINDOW_MANAGER, 
but apparently it does not work for Alex? I suspect that his 'export' 
statement is not occurring in a place where gnome-wm will be able to 
spot it, but I haven't tried it myself, nor have I tried to use gnome's 
control center to configure a different wm.

'gnome-settings-daemon' also gets launched by gnome-session, though 
apparently that's hard-coded within the executable and not mentioned in 
the man page.

I don't know yet where gnome-volume-manager or gnome-power-manager are 
first launched.

That's as far as I got. I'd be delighted to know if you discover the 
optimal way to accomplish this.


More information about the Xmonad mailing list