adi1090x / dynamic-wallpaper

A simple bash script to set wallpapers according to current time, using cron job scheduler.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wallpaper not changing using cron

akshat2602 opened this issue · comments

Output of echo $DESKTOP_SESSION is
ubuntu

Cron file -
'0 * * * * env SHELL="/usr/bin/zsh" DISPLAY=:1 DESKTOP_SESSION="ubuntu" DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus" XDG_RUNTIME_DIR="/run/user/1000" /usr/bin/dwall -s lakeside
@reboot /usr/bin/dwall -s lakeside '

Extra Info

OS: Ubuntu 20.04 LTS
WM: Mutter
DE: Gnome

Problem

The wallpaper is set correctly using the command dwall -s lakeside according to time of the day but, doesn't change using cron.
I have to run the command manually everytime so that wallpaper changes. Could you please guide me?

Do you have pywal installed ? I also faced the same issue as you, when i looked into the logs of cron service status there were something about error because pywal wasn't found. So i installed pywal, redo the whole installation thing as this github readme says and guess what.. it works

Try adding PATH environment variable in cron file. Use echo $PATH to get your path.
See my issue 45

Try adding PATH environment variable in cron file. Use echo $PATH to get your path.
See my issue 45

This seems to fix the problem.
Thanks for helping!