diff --git a/scripts/linuxparty.sh b/scripts/linuxparty.sh
index e7f81bef3b20e67d5da00262d2556b3bbdee6513..72e0684865926fb7933ff5c461d0612545e43321 100644
--- a/scripts/linuxparty.sh
+++ b/scripts/linuxparty.sh
@@ -4,9 +4,19 @@ set -e
 
 #options for GUI are kdialog zenity none
 if [ -z "$GUI" ]; then
-  GUI=kdialog
+  echo "\$GUI is not set. Auto detecting GUI..."
+
+  if command -v zenity 2>&1 > /dev/null; then
+    GUI=zenity
+  elif command -v kdialog 2>&1 > /dev/null; then
+    GUI=kdialog
+  else
+    GUI=none
+  fi
 fi
 
+echo "Using GUI=$GUI."
+
 if [ "$GUI" == "none" ]; then
   NOGUI=yes
 fi