Thursday, March 31, 2016

Rotating wallpapers

I got the wallpaper to change when I log on.  Minor fix to the command when starting up.  You start with 'Preferences' then pick 'Default applications for LXSessions'.  Click on the Autostart and create an entry like shown in the screen print.
LXSession settings

Shell command to rotate wallpaper

I then followed this up by seeing if I can put it into cron.  I did 'cron -e' from a command window and set it up to run every minute so I can see if would work.  Minutes passed and nothing happened.  I put in debug code to get the return code from pcmanfm and put it to a file.  Looking at the file I could see a return code of 1 so I knew that there was an error somewhere.  I check on-line and found an answer in stackoverflow.  I made a minor change in my script and it worked!  I reset cron to update it every 10 minutes and it still works.
cron settings to change wallpaper every 10 minutes

Bash script to change wallpaper

No comments: