summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xzprofile2
1 files changed, 1 insertions, 1 deletions
diff --git a/zprofile b/zprofile
index f03ef41..39fa6b1 100755
--- a/zprofile
+++ b/zprofile
@@ -54,4 +54,4 @@ mkdir -p "$(dirname "$ZHISTFILE")"
source "$ZDOTDIR/profiles/zprofile.$HOST" 2>/dev/null # Source additional host-specific profiles
# Autostart X after login
-[ -z $DISPLAY ] && [[ $UID != 0 ]] && [[ $TTY =~ /dev/tty(1|C0) ]] && startx "$X11CONFIG/xinitrc"
+[ -z $DISPLAY ] && [[ $UID != 0 ]] && [[ $TTY =~ /dev/tty(1|C0) ]] && command -v startx &> /dev/null && startx "$X11CONFIG/xinitrc"