The command I want to run is:
feh -Y -x -q -D 5 -B black -F -Z -z -r /location-to-images
These are the different methods I have tried (and I also tried using fbi instead of feh, but that did not work either):
Firstly, I tried adding the command after @reboot
in sudo crontab -e
(sudo is probably not necessary). Then I tried creating a bash script in /etc/init.d
:
sleep 1m
lxterminal -e "feh -Y -x -q -D 5 -B black _F -Z -z -r /location-to-images"
and made that get run at @reboot
, but alas it did nothing. And I did change the permissions to make it executable, and also I could see that the bash file and the command was being run by crontab by running grep CRON /var/log/syslog
.
Then I tried following this tutorial (creating a .desktop file), that didn't work either.
Lastly I tried modifying the /etc/rc.local
file where I wrote the following:
sleep 5
DISPLAY=:0
lxterminal -e "feh -Y -x -q -D 5 -B black _F -Z -z -r /location-to-images"
And I have run the command which according to some guy on a forum should enable rc-local, sudo systemctl enable rc-local.service
although when I run sudo sysv-rc-conf
it does not show up in the list, so there might be an issue there.
I will be forever grateful if you can help me with this! I'm planning on gifting my raspberry pi + screen as a cloud-connected digital photo frame for my parents this Christmas, and I don't want them to have to run a command each time they plug it in or the power goes out etc.