I use fvwm when I want to run a nested X11 session using Xnest or Xephyr. It' can be very useful.
Suppose you have two users on your machine, one who uses it most of the time, and a second one who uses it just now and again. You want to give the second user a way to have his own isolated desktop, so he doesn't mess around with the main users's desktop. The main user might use something like kde plasma as his desktop, but he wants to give the second user a lightweight X environment he can log into and use as if he is on a separate head... as if he were working at an X terminal connected over the network.
You can make a little script like this.
Bash:
#!/usr/bin/bash
unset DISPLAY
export DISPLAY=:0
xauth merge /tmp/myauth
# choose whether to run Xephyr fullscreen or windowed
Xephyr -fullscreen -nolisten tcp :1 2>/dev/null &
#Xephyr -screen 1024x768 -nolisten tcp -reset -terminate :1 2>/dev/null &
# hint: there is a race here, need a way to fix properly, but sleep 1 works for now
sleep 1
export DISPLAY=:1
fvwm3 &
# note we probably ought to detele the security cookie file now
rm /tmp/myauth
Note that the script runs xauth to gain permission to access the host user's display. Somewhere in the host user's login scripts you will need to run
$ xauth extract - $DISPLAY > /tmp/myauth
to initialise the authentication cookie, that can be picked up when the second user runs the script. Alternatively you can allow the second user to access the display :0 by running xhost.
Now to set up the second user's display, go to a different virtual desktop, open an xterm and login as the second user, then run the script shown above. The script will
1. merge in the authentication cookie for display :0, enabling the second user to run X clients on display :0
2. start Xephyr which provides a nested X-server, either in a separate window or fullscreen; the nested server is set to display :1
3. start fvwm as the window manager inside the nested X session, on display :1
This gives the the second user a complete self-contained X session with its own window manager, isolated from the host system. And because the second user is a separate unix login, you have full process, address space and filesystem isolation from the host user, assuming permissions are set up appropriately
Now... you COULD run something like kde itself as the nested desktop, but (a) that might get a little confusing on the same keyboard/monitor head and (b) using fvwm gives a much lighter weight desktop, so uses less machine resources. Lightweight window managers like fvwm are ideal in this nested display scenario.
And a third variant is to run the nested fvwm session over ssh on a remote machine; in that case you would change the last line of the script to run fvwm over ssh on the remote machine, rather than locally. If you have a lab full of eg test machines, this can be very useful, similar to using rdesktop to access other boxes on a lan. And that is when the true power of X11 as a network protocol rather than a local graphics library becomes apparant. If you have a large screen, you can set up say a 3x3 matrix of nested X servers, each running an independent desktop (like fvwm) on 9 different remote machines. People do this kind of thing with web interfaces nowadays, but you can do it directly with X as well. Or it's the equivalent to having a set of terminals with text ssh sessions onto a bunch of remote machines, but you have a full GUI on each remote machine.