
Hi David, On 22/12/16 20:41, Morrie Wyatt via luv-main wrote:
Hi David.
Unfortunately it's more than just $DISPLAY that's involved. These days, X is a bit more cautious about who is authorised to access the display.
You don't want any user of your PC (or other external users) to have unfettered access to your screen.
It may also be a systemd issue.... And why are your scripts in /sbin ? Doesn't seem like the /right/ location to use, just sayin' Maybe you would be better off running this in while loop in a terminal that you can minimize. #!/usr/bin/env bash ( cd /home/dz/shots while : do /usr/bin/scrot 'scap-%Y-%m-%d-%H:%M.jpg' \ -q 70 \ -e 'chown dz.dz $f' sleep 120 done ) &> /tmp/scap.debug You probably don't need the chown either... unless the session running as someone else, in which case, there is all sorts of issues to do with xauth as mentioned already. Another thing you can do is have it run at login of the session by the user's startup; if it isn't the same user that you desire to own the screen shots. Cheers A.