[Xmonad] Howtos wanted: Configuring xmonad with display managers

Donald Bruce Stewart dons at cse.unsw.edu.au
Mon Jun 4 07:01:45 EDT 2007


A.M.Gimblett:
> I'm running xmonad under FreeBSD 6.1 and Ubuntu Fiesty, both using
> gdm, from ~/.xsession.  I'm not using any Ubuntu magic to add a new
> display manager menu item - I hacked this mechanism together back when
> FreeBSD was all I used (ie until about a month ago).
> 
> The relevant part of ~/.xsession looks something like:
> 
> --
> 
> dzstatus &
> 
> while true ; do
>   PICK=$(gmessage -buttons _Xmonad,_Ice,"GTK_STOCK_QUIT" -default _Xmonad -center -print "Window Manager?")
>   case $PICK in
>       _Xmonad) /usr/local/bin/xmonad > /dev/null 2>&1 ;;
>       _Ice) /usr/bin/icewm ;;
>       GTK_STOCK_QUIT) exit ;;
>   esac
> done
> 
> --
> 
> dzstatus is a shell script which just runs a (python) status-building
> script and pipes it to a dzen2.  It's external to .xsession so I can
> easily kill/restart my status bar when tweaking.
> 
> I'm using this while/gmessage mechanism for a couple of reasons.
> First, it's sometimes nice to have a choice of window manager, though
> I don't use anything other than xmonad these days of course.
> 
> Second, and mainly, it allows me to exit xmonad without ending the X
> session, so I can restart xmonad after a rebuild.  The mod-q restart
> mechanism doesn't work for me because if I try to install a new xmonad
> while the old one is running, I get:
> 
> [gimbo at orb xmonad] sudo runghc Setup install
> Installing: /usr/local/lib/xmonad-0.2/ghc-6.6 & /usr/local/bin xmonad-0.2...
> *** Exception: /usr/local/bin/xmonad: copyFile: resource busy (Text file busy)
> 
> No-one else seems to mention this?  At first I thought it was a
> FreeBSD-ism, but I get the same under Ubuntu.  Any thoughts?

Ah ha, rm -f `which xmonad`  :

    http://xmonad.org/faq.html#config

Cabal bug (imo). We should complain to the cabal guys.


> (Related: I have to manually chmod a+rx /usr/local/bin/xmonad after
> every install, which is annoying.)

I think this was fixed in the most recent cabal. I certainly don't see
it with:

    $ ghc-pkg list Cabal
    /home/dons/lib/ghc-6.6/package.conf:
        Cabal-1.1.7

Cheers,
  Don


More information about the Xmonad mailing list