I have a .sh script that downloads a photo from Japanese satellite's server and sets it as a background picture. I've put it into startup list, but how do I run it every, like, 5 minutes, automatically?
The lazy option
If you want the easy way, and avoid having to find out which environment variable to set:
If you run the script from your own environment (e.g. from a terminal window or from Startup Applications), a number of environment variables will be set.
to set the wallpaper, almost certainly the command will break when run from
The downside of "the lazy solution" is purely theoretical. A command that sleeps practically continuously means nothing to your system.
Additional info; alternatively
Reading this post, and from experiences in the past, I am pretty sure the
To do so, add the following section at the beginning of your script (below the shebang):
Then you should be able to successfully run it from
You could however very well save the hustle, and choose the lazy option.
Put it in your
Don't forget to make the script executable beforehand.
As your script depends on X, probably will be a good idea to add the
If needed, you can add the
Again you can find the value by