#!/bin/sh
# Ask which WM to use
# (possibly do something with the background here to make it look a little better)
xmessage -buttons "kde:1,fvwm2:2,blackbox:3,enlightenment:4" "Please choose your window manager..."
# (possibly use -geometry to neatly align the window)
CHOICE=$?
case ${CHOICE} in
1) WM=/path/to/kde
WM_ARGS="--options bla bla config file this or that"
;;
2) WM=/path/to/fvwm2
WM_ARGS="--fvwm2 arguments"
;;
3) WM=/path/to/blackbox
WM_ARGS="you get the idea"
;;
4) WM=/path/to/enlightenment
WM_ARGS="whatever"
;;
esac
# Start WM and remember its PID
${WM} ${WM_ARGS} &
WAIT_PID=$!
# Do additional stuff if you like
xterm&
xv -root -quit -max ~/wallpaper.jpg&
# Wait for the WM to die
wait ${WAIT_PID}
exit 0