So I do not really understand, the script called from udev fails. However, if I do su -c xrandr mu from my sudo -i shell, I get the expected output. Now if I call xrandr from my sudo -i shell, I get: No protocol specified I added the above entry to /etc/hosts and i no longer have to manually set the DISPLAY env var after. DISPLAY :0 TERM xterm XAUTHORITY /home/admin/. more than likely this answer works because 127.0.0.1 localhost is not defined within the /etc/hosts file as most debian based distros setup 127.0.1.1 localhost thus when you manually set this env var after logging in, things begin to work. But when I let udev run it, it just get the following error from xrandr: # output of bash -x think-dock on No protocol specified xhost: unable to open display ':0' on both root and regular user. I can sudo -i and run think-dock-hook on and it works too. The thing is that I can run think-dock on as my user ( mu) and it works. Su -c "bash -x /usr/bin/think-dock $setto" "$user" > /root/think-dock.log 2>
0 Comments
Leave a Reply. |