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.

#! /bin/bash

#export DISPLAY=:0
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?

Thanks

Ratin
_______________________________________________
[email protected]: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s

Reply via email to