xmonad from gnome-session-2.26

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/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. Greetings, Joachim -- Joachim Breitner e-Mail: mail@joachim-breitner.de Homepage: http://www.joachim-breitner.de ICQ#: 74513189 Jabber-ID: nomeata@joachim-breitner.de

Hi,
I'm getting the following in .xsession-errors:
x-session-manager[7478]: WARNING: Unable to find provider 'xmonad' of
required component 'windowmanager'
Any hints?
Alexey
2009/5/30 Joachim Breitner
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/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.
Greetings, Joachim
-- Joachim Breitner e-Mail: mail@joachim-breitner.de Homepage: http://www.joachim-breitner.de ICQ#: 74513189 Jabber-ID: nomeata@joachim-breitner.de
_______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad

HI, Am Montag, den 01.06.2009, 19:37 +1000 schrieb Alex Feigin:
I'm getting the following in .xsession-errors:
x-session-manager[7478]: WARNING: Unable to find provider 'xmonad' of required component 'windowmanager'
Any hints?
ah, yes, the Debian xmonad package ships this file: $ cat /usr/share/applications/xmonad.desktop [Desktop Entry] Type=Application Encoding=UTF-8 Name=Xmonad Exec=xmonad NoDisplay=true X-GNOME-WMName=Xmonad X-GNOME-Autostart-Phase=WindowManager X-GNOME-Provides=windowmanager X-GNOME-Autostart-Notify=false it’s probably needed as well. If you want to include that in the official xmonad distribution, I’d be grateful. Greetings, Joachim -- Joachim Breitner e-Mail: mail@joachim-breitner.de Homepage: http://www.joachim-breitner.de ICQ#: 74513189 Jabber-ID: nomeata@joachim-breitner.de

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 }

* On Thursday, September 17 2009, rupa wrote:
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: ... 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 ()
I've pushed a contrib patch adding this function as XMonad.Config.Gnome.gnomeRegister

Hi,
The patch works here but doesn't play well with xmonad log monitor applet
for gnome-panel (http://uhsure.com/xmonad-log-applet.html). anyone got the
same problem?
My xmonad log monitor just always shows 'waiting xmonad ..' after xmonad
startup.
Thanks,
Jan
On Fri, Sep 18, 2009 at 7:51 AM, Adam Vogt
* On Thursday, September 17 2009, rupa wrote:
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: ... 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 ()
I've pushed a contrib patch adding this function as XMonad.Config.Gnome.gnomeRegister _______________________________________________ xmonad mailing list xmonad@haskell.org http://www.haskell.org/mailman/listinfo/xmonad
-- Fly on wheels.
participants (5)
-
Adam Vogt
-
Alex Feigin
-
Jan
-
Joachim Breitner
-
rupa