[xmonad] xmonad from gnome-session-2.26

rupa rupa at lrrr.us
Thu Sep 17 15:50:42 EDT 2009


I was able to get this working, and the (noticeable) timeout has gone,
after some help in IRC. The problem was that the rawSystem call was
blocking. The following did the trick:

[...]
import System.Environment
import System.Cmd
import Control.Concurrent
[...]
main = do
    env <- getEnvironment
    case lookup "DESKTOP_AUTOSTART_ID" env of
        Just id -> do
            forkIO $ (>> return ()) $ 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
    }


More information about the xmonad mailing list