Linux question here. I've got the following code to grab health stats and each command works on its own when I login as a regular user. Some boxes execute ok without having an active X session on my console (via ssh), others require the X session. The GPUs are running fine and my mining is fine. The problem is when I try to run these commands from a shell script. They all complain about "No Protocol Specified". How can I fix this so they will run from a shell script via crontab?
export DISPLAY=:0
export AMDAPPSDKROOT=/opt/AMD-APP-SDK-v2.4-lnx64
export AMDAPPSDKSAMPLESROOT=/opt/AMD-APP-SDK-v2.4-lnx64
export LD_LIBRARY_PATH=${AMDAPPSDKROOT}/lib/x86_64:${LD_LIBRARY_PATH}
FAN=`/usr/bin/aticonfig --pplib-cmd "get fanspeed 0"|grep "Fan Speed"|awk -F: '{print $3}'`
TEMP=`/usr/bin/aticonfig --odgt --adapter=$DEVICE | grep -o '[0-9][0-9].[0-9][0-9]' | sed 's/\.[0-9][0-9]//g'`
CLOCK=`/usr/bin/aticonfig --odgc --adapter=$DEVICE | grep "Current Clock"| grep -o '[0-9][0-9][0-9]'|head -n 1`
MEM=`/usr/bin/aticonfig --odgc --adapter=$DEVICE | grep "Current Clock"| grep -o '[0-9][0-9][0-9][0-9]'|tail -n 1`