I wrote a bash script to change my wallpaper automatically on Ubuntu 20.04 and it works well, but when I'm trying to automate it with crontab it doesn't work, the wallpaper isn't changing.
Here is my script :
#!/bin/bash
DIR="/home/mbz/Wallpapers"
PIC=$(find $DIR -type f -maxdepth 1 2>/dev/null | shuf -n1)
gsettings set org.gnome.desktop.background picture-uri "file://$PIC"
after typing crontab -e, i put in the end of the file the line below to change it very 1mn
* * * * * cd /home/mbz/Desktop/ && bash ba.sh
But, it's not changing the wallpaper !