From 23e5c347f27f5601f51c349f5cb3ed2712556ba8 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Fri, 7 Apr 2017 16:37:05 +0200 Subject: [PATCH] 030-wm.sh: switch to sudo to fix controlling tty issue with recent X.org X.org doesn't run as root anymore (unless using xserver-xorg-legacy workaround). When invoking X.org via 'su -c ...' no controlling tty can be acquired, because of a change in upstream's shadow release 4.1.5 (dating back to 2011-06-05). Related to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802769 We need read and write permissions on the TTY, so adjust the TTY we're running on accordingly. --- quickconfig/030-wm.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/quickconfig/030-wm.sh b/quickconfig/030-wm.sh index cc3bd99..b9f460c 100644 --- a/quickconfig/030-wm.sh +++ b/quickconfig/030-wm.sh @@ -74,7 +74,9 @@ wm_heading() { # print windowm manager loop {{{ wm_menu() { if [ $AVAILABLE_WM_COUNT == 1 ]; then - run su grml -c "grml-x" + chgrp tty "$TTY" + chmod g+rw "$TTY" + run sudo -u grml grml-x return fi echo @@ -88,7 +90,9 @@ wm_menu() { get_key INPUT case $INPUT in [${(k)available}]) - run su grml -c "grml-x ${available[$INPUT]}" + chgrp tty "$TTY" + chmod g+rw "$TTY" + run sudo -u grml -c "grml-x ${available[$INPUT]}" ;; esac } -- 2.1.4