[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmonad
Subject:    [xmonad] xmonad from gnome-session-2.26
From:       Joachim Breitner <mail () joachim-breitner ! de>
Date:       2009-05-29 22:27:02
Message-ID: 1243636022.23900.4.camel () localhost
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Hi,

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
http://live.gnome.org/SessionManagement/GnomeSession

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/Sess \
ionManager","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.

Greetings,
Joachim

-- 
Joachim Breitner
  e-Mail: mail@joachim-breitner.de
  Homepage: http://www.joachim-breitner.de
  ICQ#: 74513189
  Jabber-ID: nomeata@joachim-breitner.de


["signature.asc" (application/pgp-signature)]

_______________________________________________
xmonad mailing list
xmonad@haskell.org
http://www.haskell.org/mailman/listinfo/xmonad


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic