From 8600c1fecaf71898dba0721398e26148bfbb6e78 Mon Sep 17 00:00:00 2001 From: Tim Keller Date: Fri, 12 Sep 2025 21:58:05 -0500 Subject: check if startx is available before running it --- zprofile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'zprofile') 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" -- cgit v1.2.3