Warning: this is an htmlized version!
The original is across this link,
and the conversion rules are here.
#!/bin/bash
# Based on:
# (find-angg ".zshrc" "aa")

if   [[ $TERM == "linux" && $(tty) == "/dev/tty5" ]]; then
  echo "exec xinit -- :0.0"
        exec xinit -- :0.0
elif [[ $TERM == "linux" && $(tty) == "/dev/tty6" ]]; then
  echo "exec xinit -- :1.0"
        exec xinit -- :1.0
elif [[ $TERM == "xterm" && $DISPLAY == ":0.0" ]]; then
  echo "exec startxfce4"
        exec startxfce4
elif [[ $TERM == "xterm" && $DISPLAY == ":1.0" ]]; then
  echo "exec startfluxbox"
        exec startfluxbox
else
  echo "a: TERM=$TERM, TTY=$TTY, DISPLAY=$DISPLAY, don't know what to do"
fi