Suppose I don't start the display manager on boot and login through the terminal. How would I switch my window manager? With gdm or gdm3, you use a scroll box to select it.
xinit take an X client on their command line. This can be the name of a window manager or session manager.
If you don't pass this argument, then they run the script
~/.xinitrc, which is responsible for starting your window manager. In the absence of this file, they use some system default.
The Arch Wiki has an example script that you can include in your
.xinitrc to choose a particular window manager when you start
# Executed by startx (run your window manager from here) if [[ $1 == "fluxbox" ]] then exec startfluxbox elif [[ $1 == "spectrwm" ]] then exec spectrwm else echo "Choose a window manager" fi
You can then simply issue
xinit fluxbox or
xinit spectrwm to log into your wm of choice.
If you did want a list of window managers to choose from, you could look at a tool like CDM, the console display manager.
If you want to switch to GNOME, run
in ~/.xinitrc file.
If your system supports runlevel 5 then just hit the command