How about:
/usr/sbin/chksession -l
I saw that on google groups as a command to list Window managers in Mandrake.
Here is a clip from the post:
O.K., I finally figured out how to start the Window Manager of
my choice via shell commands. Upon careful review of the scripts:
/usr/X11R6/bin/startx, /etc/X11/xinit/xinitrc, and /etc/X11/Xsession,
it appears that the command: /usr/sbin/chksession -l
will give a list of the Window Managers available.
In my case:
$ /usr/sbin/chksession -l
KDE Gnome WindowMaker Enlightenment BlackBox XFce AfterStep IceWM
Sawfish Fvwm2 Fvwm1 default failsafe
To start X with GNOME, I simply have to type:
$ startx Gnome
and it works! (The same works with KDE, WindowMaker, etc.)
One word of caution, however, if you use "startx Enlightenment",
it will create the file: $HOME/.xinitrc, $HOME/.Xclients, and some
other file (I think $HOME/.xsession, but I'm not positive at the
moment). Just be sure to delete those files/links before trying
startx with any other Window Manager, or you'll just get
Enlightenment starting.
Of course, you can make an alias for each of the startx sessions.
For me 'g' is aliased to "startx Gnome", 'k' is aliased to
"startx KDE".
Cheers,
GenEric Bruce Garlock
bruceg@tiac.net