[xmonad] xmonad from gnome-session-2.26

Joachim Breitner mail at joachim-breitner.de
Fri May 29 18:27:02 EDT 2009


If you want to use xmonad from gnome-session-2.26, the correct way seems
to be to specify
# gconftool-2 -s /desktop/gnome/session/required_components/windowmanager xmonad --type string

This unfortunately has the effect that gnome-session waits a few seconds
for the window manger (now xmonad) to register via dbus, see

xmonad does not support the gnome-session protocol, but you can work
around the delay with this code in xmonad.hs

import XMonad
import System.Environment
import System.Cmd
main = do
	env <- getEnvironment
	case lookup "DESKTOP_AUTOSTART_ID" env of
	  Just id -> do
		rawSystem "dbus-send" ["--session","--print-reply=string","--dest=org.gnome.SessionManager","/org/gnome/SessionManager","org.gnome.SessionManager.RegisterClient","string:xmonad","string:"++id]
		return ()
	  Nothing -> return ()
	xmonad $ defaultConfig {
[...]      -- simple stuff

I guess some stuff can be improved about this, such as using the DBus
package from hackage, but it’s a start.


Joachim Breitner
  e-Mail: mail at joachim-breitner.de
  Homepage: http://www.joachim-breitner.de
  ICQ#: 74513189
  Jabber-ID: nomeata at joachim-breitner.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://www.haskell.org/pipermail/xmonad/attachments/20090529/74615052/attachment.bin

More information about the xmonad mailing list