From 6a229910260bec54f6878c8767929cb2bfab6bb6 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Thu, 25 Jun 2020 09:40:54 +0200 Subject: [PATCH] [sh] Fix comparison error for autostart x script When no virtual terminal is set (as an XDG value by e.g. the linux installation), fixes error complaining about comparing nothing with an integer. --- sh/.config/sh/profile.d/autostartx.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/.config/sh/profile.d/autostartx.sh b/sh/.config/sh/profile.d/autostartx.sh index 5da5059..08bce98 100644 --- a/sh/.config/sh/profile.d/autostartx.sh +++ b/sh/.config/sh/profile.d/autostartx.sh @@ -1,5 +1,5 @@ #!/usr/bin/env sh -if [ ! "$DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then +if [ ! "$DISPLAY" ] && [ -n "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then exec startx "$XDG_CONFIG_HOME"/xresources/xinitrc fi