dt.iki.fi

Window Managers

Linux is somewhat famous for having so many different windowmanagers; this is not a complete list.
My interest was in those that

  • typically run in a standalone session (not as part of a desktop environment, like e.g. mutter for gnome)
  • are somewhat maintained, not too obscure or specialized

I also have a special interest in those that can do both floating and tiling, but not all windowmanagers presented here fulfil that.

The screenshot gallery provides only a very quick overview: what you would be presented with after succesfully starting them for the first time. It does not "show off" the windowmanager's beauty and/or functionality.

Gallery thumb
You have to admire vtwm's ugliness.

I have explored some windowmanagers deeper; you can find links to those articles here:

  1. fluxbox
  2. dwm
  3. twm

Tested on Arch Linux, August - November 2016
This article now has an accompanying forum thread.
It is also inspired by this older forum thread.

Starting the window managers

After you installed the window manager(s), log out.
If you use a display/login manager, you might be able to choose different sessions, and with a little bit of luck your window manager of choice already provides one. If not, follow these instructions.

If you start X via ~/.xinitrc, here are some helpful snippets:

add this to ~/.bash_profile (might be ~/.profile on some systems, but this snippet includes bashisms):
The only bit you might want to edit is the array of window manager executables in the first line. Even so, each entry is tested with which before presenting it as a choice.

bash
Xsessions=(awesome blackbox bspwm cwm dwm echinus fluxbox fvwm herbstluftwm i3 \ jbwm lwm notion openbox pekwm qtile spectrwm twm vtwm) choices=() echo "Available Xsessions:" for (( i=0 , j=1 ; i<${#Xsessions[@]} ; i++ )); do if which "${Xsessions[i]}" >/dev/null 2>&1; then choices=( ${choices[@]} ${Xsessions[i]} ) tput setaf $((j%6 + 1 )) echo -e "$((j++))\t${Xsessions[i]}" fi done tput setaf $((j%6 + 1 )) echo -e "Ctrl+C\tcommand line" tput sgr0 key=-1 while (( key > ${#choices[@]} )) || (( key <= 0 )) ; do read -p "Enter choice: " key done if (( key != 0 )) ; then echo "$key: ${choices[$((--key))]}" export XSESSION="${choices[key]}" [[ -z $DISPLAY ]] && sx fi

then add this to ~/.xinitrc:

bash
xsetroot -solid "#221111" xterm & exec $XSESSION > ${XSESSION}log 2>&1

I recommend starting an xterm (or some other terminal) before the window manager, because it won't always be easy to start one during the session. Not all window managers handle Keyboard shortcuts (!) and even so, the keys or mouseclicks required differ. Try opening a terminal with Win+Enter or Alt+Enter or Shift+Alt+Enter. Try clicking on the desktop, left right and middle...

for more in-depth experimenting one could replace the previous snippet with this:

sh
exec $XSESSION > ${XSESSION}log 2>&1 & # XSESSION defined through user choice in ~/.bash_profile wm_pid=$! { . $HOME/.config/autostart.sh } & wait $wm_pid

this will start the Xsession defined in the previous snippet, and allows you to execute some autostart stuff with any window manager, even those that don't usually support it.

additionally, your ~/.config/autostart.sh could contain sth like this:

sh
# also see ~/.bash_profile case $XSESSION in i3) stuff & ;; twm) otherstuff & ;; dwm*) morestuff & ;; *) # this will be executed for all wms that are not in the above list; # but it will NOT be executed for any of the above! stuff & ;; esac

Once a final (or long-term) decision is made, this should be changed again to a more streamlined startup. Many windowmanagers offer everything that is needed for autostarting applications, no need for additional scripts.