xrandr weird issue running from a script
ratin3 at gmail.com
Tue Nov 8 22:19:08 UTC 2016
I am testing this simple script, calling it from php via apache web server.
But anything to do with xrandr is simply omitted by the scipt while
everything else include system calls like reboot etc works fine. Initially
I thought its because the DISPLAY env variable issue but it gets the
variable correctly in the logs, so now I am totally baffled.
export Dis=$(echo $DISPLAY)
echo "Display: $Dis" > /var/log/updateDDInfo.log
checkHDMI=`sudo /usr/bin/xrandr| grep -i "HDMI1.*\ connected"`
checkDP=`sudo /usr/bin/xrandr --display :0| grep -i "DP1.*\ connected"`
echo "p.sh: HDMI Check: $checkHDMI " > /var/log/updateDDInfo.log
echo "p.sh: DP Check: $checkDP " > /var/log/updateDDInfo.log
If I run from command prompt I get the usual response:
"p.sh: DP Check: DP1 connected 3840x2160+1920+0 (normal left inverted right
x axis y axis) 607mm x 345mm"
Anybody has any clue?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the xorg