Pcmanfm set wallpaper fails on Raspbian stretch in cron
问题 I am running a nearly fresh image of Raspbian Stretch 4.9 with a desktop and have a program which creates a new image for the computer background every few minutes. I am trying to create a cron job to properly update the background using pcmanfm and, having followed the suggestions here, have created the following script called update.sh to set the background: !#/bin/bash export DISPLAY=:0 export XAUTHORITY=/home/pi/.Xauthority pcmanfm -w '/home/pi/folder/image.png' The script is executable