Howtos wanted: Configuring xmonad with display managers

Hi, I keep running into people on #xmonad or #haskell who are trying to configure, eg, gdm to run xmonad. I've never run a display manger, so I have no clue how to help them. I think it would be great if we had a page that listed most popular display manger type configurations, and how to set up xmonad in them. Is anybody running [xgk]dm with xmonad? If so, how? Please post your answer here, stating what distro you're running (is anybody running xmonad on something other than Linux?) and we'll compile the answers and put them up on the webpage. Or maybe there needs to be an xmonad wiki or something. In any case, this seems to be a hurdle that lots of people are hitting, and I think we should try to make it as easy as possible to run xmonad. Jason Creighton

Jason Creighton
Is anybody running [xgk]dm with xmonad? If so, how? Please post your answer here, stating what distro you're running (is anybody running xmonad on something other than Linux?) and we'll compile the answers and put them up on the webpage. Or maybe there needs to be an xmonad wiki or something.
I'm running Debian unstable with gdm, and I just have an executable script ~/.xsession which (after running ssh-agent, etc.) runs xmonad. As, before, it ran ion3. The rule is that once ~/.xsession exits the session ends. So normally the window manager is the last thing you run, and it's not run in the background.

Bruce Stephens
I'm running Debian unstable with gdm, and I just have an executable script ~/.xsession which (after running ssh-agent, etc.) runs xmonad. As, before, it ran ion3.
Shows how long ago I first started doing this: the critical step is to choose the Xsession session when logging in to gdm. I imagine kdm does something similar. By default they'll give you a typical gnome or kde setup (modified by local files), but you can ask for the traditional option which mostly involves running ~/.xsession, if it exists, and some default script otherwise. There are (typically) some stumbling blocks to do with PATH and so on, but I imagine most people could resolve those easily enough once they'd at least got the right window manager running. [...]

At Sat, 2 Jun 2007 12:01:34 -0600, Jason Creighton wrote:
Hi,
I keep running into people on #xmonad or #haskell who are trying to configure, eg, gdm to run xmonad. I've never run a display manger, so I have no clue how to help them. I think it would be great if we had a page that listed most popular display manger type configurations, and how to set up xmonad in them.
For kde you can set the environment variable KDEWM=xmonad. Then KDE will start like normal, but it will use xmonad instead of kwin. I believe you would have to make your .xsession look something like this: #!/bin/sh export KDEWM=/usr/local/bin/xmonad /usr/bin/x-session-manager However, I have not tested this. hth, j.

Jeremy Shaw
At Sat, 2 Jun 2007 12:01:34 -0600, Jason Creighton wrote:
I keep running into people on #xmonad or #haskell who are trying to configure, eg, gdm to run xmonad. I've never run a display manger, so I have no clue how to help them. I think it would be great if we had a page that listed most popular display manger type configurations, and how to set up xmonad in them.
For kde you can set the environment variable KDEWM=xmonad.
Does anyone know what to do for Gnome? Kai

Jason Creighton on 2007-06-02 12:01:34 -0600:
Is anybody running [xgk]dm with xmonad? If so, how?
I'm using xdm on Debian testing. Create an ~/.xsession just as you would an ~/.xinitrc (mine are symlinked), making sure the last line is "exec /path/to/xmonad", and you're good to go.

Jason Creighton wrote:
Is anybody running [xgk]dm with xmonad? If so, how? Please post your answer here, stating what distro you're running (is anybody running
Hey, I'm running xmonad under gdm in Ubuntu Dapper. All I had to do was create an extra file; the location varies by distribution, but mine had to go in /usr/share/xsessions: ~% cat /usr/share/xsessions/xmonad.desktop [Desktop Entry] Encoding=UTF-8 Name=xmonad Comment=This session starts xmonad Exec=/usr/local/bin/xmonad Type=Application Then, when logging in, you can select "xmonad" as a session in the "Options" menu in the lower-left hand corner of the login screen. ~d

02.06.2007 в 12:01:34 -0600 Jason Creighton написал:
Is anybody running [xgk]dm with xmonad? If so, how? Please post your answer here, stating what distro you're running (is anybody running xmonad on something other than Linux?) and we'll compile the answers and put them up on the webpage. Or maybe there needs to be an xmonad wiki or something.
I am running xmonad on Debian with xdm from ~/.xsession which contains: #!/bin/zsh if [ -d ~/bin ]; then PATH=~/bin:"${PATH}" export PATH fi xmodmap -e 'add mod4 = Super_L' -e 'add mod4 = Super_R' (xscreensaver&) (emacs&) (urxvt&) exec xmonad Also, xmonad does not properly handle its children exiting, so I have to start programs as "(urxvt&)" instead of "urxvt&" to prevent them from becoming zombies (or I could just remove "exec").

stepan:
02.06.2007 ? 12:01:34 -0600 Jason Creighton ???????:
Is anybody running [xgk]dm with xmonad? If so, how? Please post your answer here, stating what distro you're running (is anybody running xmonad on something other than Linux?) and we'll compile the answers and put them up on the webpage. Or maybe there needs to be an xmonad wiki or something.
I am running xmonad on Debian with xdm from ~/.xsession which contains:
#!/bin/zsh if [ -d ~/bin ]; then PATH=~/bin:"${PATH}" export PATH fi xmodmap -e 'add mod4 = Super_L' -e 'add mod4 = Super_R' (xscreensaver&) (emacs&) (urxvt&) exec xmonad
Also, xmonad does not properly handle its children exiting, so I have to start programs as "(urxvt&)" instead of "urxvt&" to prevent them from becoming zombies (or I could just remove "exec").
Oh hmm. That sounds like a bug report. -- Don

I'm using gdm. I created a /usr/share/xsessions/xmonad.desktop by modifying gnome.desktop from the same directory. I basically just changed the name and executable but didn't bother with all the localization names. Then you can choose xmonad from the login screen. The .xsession method is of course simpler for a local install... such as mine. Oh well. -- Joel

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@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? (Related: I have to manually chmod a+rx /usr/local/bin/xmonad after every install, which is annoying.) -Andy -- Andy Gimblett Computer Science Department University of Wales Swansea http://www.cs.swan.ac.uk/~csandy/

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@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

On Mon, Jun 04, 2007 at 09:01:45PM +1000, Donald Bruce Stewart wrote:
Ah ha, rm -f `which xmonad` :
D'oh! Thanks. I'm sure that wasn't in the FAQ last time I read it. ;-)
(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
Odd: I do. :-) Are you tracking Cabal darcs, or is that the stable 1.1.7? [gimbo@orb xmonad] ghc-pkg list Cabal /usr/lib/ghc-6.6/package.conf: Cabal-1.1.7 Still, thanks! -Andy -- Andy Gimblett Computer Science Department University of Wales Swansea http://www.cs.swan.ac.uk/~csandy/

On 6/4/07, Donald Bruce Stewart
A.M.Gimblett:
[gimbo@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` :
Alternatively, add xmonad's build directory to your PATH, or symlink from a location in your path to the built copy, and just don't run install. --dave -- David Glasser | glasser@mit.edu | http://www.davidglasser.net/
participants (11)
-
Alec Berryman
-
Andy Gimblett
-
Bruce Stephens
-
Daniel Wagner
-
David Glasser
-
dons@cse.unsw.edu.au
-
Jason Creighton
-
Jeremy Shaw
-
Joel Koerwer
-
Kai Grossjohann
-
Stepan Golosunov