I have written a python script that will change my desktop wallpaper on my Lxde crouton shell, that seems to run just fine:
import os
from time import localtime
from pathlib import Path
wp = Path("/home/lucasmccallums/Desktop/projects/wallpaper_transitions")
hour = localtime().tm_hour
if (hour < 6) or (hour >= 21):
os.system("pcmanfm --set-wallpaper=" + str(wp / "night.png"))
elif (hour >= 14):
os.system("pcmanfm --set-wallpaper=" + str(wp / "afternoon.png"))
else:
os.system("pcmanfm --set-wallpaper=" + str(wp / "morning.png"))
However when I try to run it through crontab as
*/1 * * * * /usr/bin/python3 /home/lucasmccallums/Desktop/projects/wallpaper_transitions/desktopdemo.py
It seemingly installs fine
crontab: installing new crontab
However it still doesn't seem to work. I try to use the command
/etc/init.d/cron start
But am faced with
cron: can't open or create /var/run/crond.pid: Permission denied
I shall keep updating as I try to figure this out but any help will be much appreciated, thank you!