startx: use /var/run/grml-x/window-manager for selection of specific window manager
authorMichael Prokop <mika@grml.org>
Sun, 28 May 2017 17:50:49 +0000 (19:50 +0200)
committerMichael Prokop <mika@grml.org>
Sun, 28 May 2017 17:50:49 +0000 (19:50 +0200)
Closes grml/grml#44

etc/skel/.zprofile

index 6c813b4..d5b10bd 100644 (file)
@@ -1,4 +1,11 @@
 # handle automatic X.org/grml-x startup on Grml live system
 if [ -r /etc/grml_cd ] ; then
-  [[ -z "$DISPLAY" && -n "$XDG_VTNR" && "$XDG_VTNR" -eq 7 ]] && grml-x
+  # /var/run/grml-x/window-manager is an ugly hack to share
+  # selection of window manager via startx boot option
+  # and grml-quickconfig with this startup wrapper
+  if [ -r /var/run/grml-x/window-manager ] ; then
+    [[ -z "$DISPLAY" && -n "$XDG_VTNR" && "$XDG_VTNR" -eq 7 ]] && grml-x "$(cat /var/run/grml-x/window-manager)"
+  else
+    [[ -z "$DISPLAY" && -n "$XDG_VTNR" && "$XDG_VTNR" -eq 7 ]] && grml-x
+  fi
 fi