I don't think rndback needs to be run as user, so you can run it as root without problem.
#Pull in the config, if possible... [ -f /home/user/.wallpaper ] && . /home/user/.wallpaper #These come from the config file... If not, fall back on defaults [ "x$IMGTYPE" != x ] || IMGTYPE="jpg\|png\|gif" [ "x$IMGDIRS" != x ] || IMGDIRS="/home/user/MyDocs/.images /usr/share/backgrounds" find $IMGDIRS | grep -i "\.\($IMGTYPE\)" > /tmp/wplist.txt TOTIMGS=`wc -l < /tmp/wplist.txt` # pick out a random line from the list RNDIMG=`awk -v tot=$TOTIMGS 'BEGIN {srand();printline=(rand()*10000%tot)+1;printline=substr(printline,1,index(printline,".")-1)} NR==printline' /tmp/wplist.txt` echo changing to $RNDIMG setback "$RNDIMG"