Don't ask for X session on SSH conn

This commit is contained in:
Jeremy Gardais 2019-06-19 22:35:37 +02:00
parent 6b2f00d4f0
commit 72ca23231c
1 changed files with 9 additions and 9 deletions

18
zlogin
View File

@ -66,15 +66,15 @@ if [ ${USER} != "root" ] && [ $(command -v startx) ]; then
# If it's a VC console and # If it's a VC console and
# no X session already launch and # no X session already launch and
# no ~/.noxorg file exist # no ~/.noxorg file exist
if [ -n `tty | grep '/dev/tty'` ] && [ -z "`ps aux|grep "start[x]"`" ] && [ ! -f ~/.noxorg ];then if [ -z "${SSH_TTY}" ] && [ -z "$(pidof /usr/lib/xorg/Xorg)" ] && [ ! -f ~/.noxorg ];then
echo "Aucune session X11 détecté, voulez vous en lancer une ? [O|n]" echo "Aucune session X11 détectée, voulez vous en lancer une ? [O|n]"
getc start_x getc start_x
if [ `echo "$start_x" | grep "n"` ];then if [ `echo "$start_x" | grep "n"` ];then
echo "X11 ne sera pas lancé." echo "X11 ne sera pas lancé."
else else
`startx -- :1 vt1` `startx -- :1 vt1`
fi fi
fi fi
fi fi
# Keychain {{{ # Keychain {{{