summaryrefslogtreecommitdiff
path: root/zsh/.zlogin
blob: c25f783486fcb1b040ef37b25ec99e48fd5bcbae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
if [[ $(uname) == "Linux" ]]; then             # on linux
  if [ -z $SSH_CLIENT ]; then                  # not via ssh
    if [[ -z $DISPLAY ]]; then                 # not in X
      if [[ $TTY == "/dev/tty1" ]]; then       # tty1
        if [[ -z $(pidof X) ]]; then           # no X running
          startx 1>/tmp/xsession-errors 2>&1 & # startx
          if [[ -x $(which vlock) ]]; then     # if have vlock
            vlock                              # run it
          fi
        fi
      fi
    fi
  fi
fi