From 51ab3ff3fae7feee6cb5d757eec1b96a6d52822f Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Sat, 17 Feb 2018 20:18:10 +0100 Subject: [PATCH] Fix Xorg detection condition. --- packages/os.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/os.sh b/packages/os.sh index 8e2a8f2..85c4848 100644 --- a/packages/os.sh +++ b/packages/os.sh @@ -87,6 +87,7 @@ done # graphics UI detection # basically just checks if an X server is running on the machine and if yes, we just assume it's a desktop, not a server -if ps aux | grep Xorg >/dev/null 2>&1; then +# grep will be always returned as a process with Xorg in the command line, so assume there must be a second process for this to succeed +if [ $(ps aux | grep Xorg | wc -l) -gt 1 ]; then add_tag "xorg_running" "desktop" fi