diff options
-rw-r--r-- | zsh/.zlogin | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/zsh/.zlogin b/zsh/.zlogin index b9e6d7f..478e144 100644 --- a/zsh/.zlogin +++ b/zsh/.zlogin @@ -1,8 +1,10 @@ if [[ $(uname) == "Linux" ]]; then - if [[ -z $DISPLAY ]] && (( $EUID != 0 )) { - [[ ${TTY/tty} != $TTY ]] && (( ${TTY:8:1} <= 3 )) && - startx 1>/tmp/xsession-errors 2>&1 & - vlock - } + if [ ! -n "$SSH_CLIENT" ] || [ ! -n "$SSH_TTY" ]; then + if [[ -z $DISPLAY ]] && (( $EUID != 0 )) { + [[ ${TTY/tty} != $TTY ]] && (( ${TTY:8:1} <= 3 )) && + startx 1>/tmp/xsession-errors 2>&1 & + vlock + } + fi fi |