Xmonad/Config archive/Running multiple xsessions at once
It may be of use to run multiple xsessions at the same time. Despite a few annoying bugs, this is quite possible. This is useful in the case that you want to have gnome-shell(for compositing effects like magnification), and xmonad, or xmonad plus some tiling window manager that plays nice with Java(in the case that wmname LG3D doesn't suffice).
You can then switch between window managers as quickly as CTRL-ALT-F<number> rather than having to restart. This is also sometimes more stable than trying to integrate gnome panels into xmonad itself.
GDM doesn't play nice with multiple xsessions. It is also inefficient, because it starts x for itself, and then restarts x when it loads the session. You can just use startx, which works excellently. Then you have the problem of managing multiple .xinitrc files. This is where HDM comes in. It allows you to place multiple xinitrc files in ~/.xinitrc.d/ and then choose between them using an ncurses-like(vty based) menu. HDM is written in Haskell.
Just as an example, I(timthelion) have three files in my ~/.xinitrc.d/ folder:
& ls ~/.xinitrc.d current gnome xfce4 xmonad
$ cat gnome gnome-session
$ cat xfce4 setxkbmap cz -option ctrl:nocaps xmodmap ~/.xmodmap-xmonad xfce4-session
$ cat xmonad
- set the cursor
xsetroot -cursor_name left_ptr
- set Czech keyboard layout
setxkbmap -layout cz -option ctrl:nocaps xmodmap ~/.xmodmap-xmonad ck-launch-session xmonad | dzen2 -y 750 -x 0 -w 500 & i3status | dzen2 -y 750 -x 500
There is more information on how HDM works in the source file hdm.lhs