From 91e2532b3e92b61854a87bbfc6e3a6112e500d9e Mon Sep 17 00:00:00 2001 From: Guillaume Dott Date: Fri, 12 Mar 2021 11:48:44 +0100 Subject: [PATCH] zsh: improve condition for startx --- zsh/.zlogin | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zsh/.zlogin b/zsh/.zlogin index 4cd88e3..568c292 100755 --- a/zsh/.zlogin +++ b/zsh/.zlogin @@ -1,5 +1,5 @@ emulate sh -c 'source /etc/profile' -if [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then - exec startx +if systemctl -q is-active graphical.target && [[ ! $DISPLAY && "$(tty)" = "/dev/tty1" ]]; then + exec startx fi