Another way in which you could do it, is by creating a .xinitrc
file and put in there the paths to your many Windows Managers, and comment or uncomment as the need arise.
Example, assuming that the executables for wmaker, xfce4, fluxbox and fvwm are in /usr/local/bin
you could easily do:
The first line will create .xinitrc and add the path to the executable, the subsequent lines will just append "exec ..." to .xinitrc
echo "exec /usr/local/bin/wmaker" > ~/.xinitrc
echo "exec /usr/local/bin/startxfce4" >> ~/.xinitrc
echo "exec /usr/local/bin/fluxbox" >> ~/.xinitrc
echo "exec /usr/local/bin/fvwm" >> ~/.xinitrc
You will end up having something like this in your .xinitrc file:
Now, the only thing you need to do is comment all the lines except the one that has the WM you want to use, and then just startx. Assuming you want xfce, the .xinitrc would look like:
I hope this help, have a nice day.