How To Automatically Change GNOME Background In Intervals Using BASH
Then copy & paste the below script to your newly created script file.
âYou have to enter your own custom path on the environment variable wallpaper_path. For instance, if your wallpaper (or picture) directory is in /home/abc/Pictures/Wallpapers you would have to modify that line:export wallpaper_path=<your wallpaper folder path>to
export wallpaper_path=/home/abc/Pictures/WallpapersMoreover, Iâve added the most common image file extensions on the array variable wallpapers. But your preferred image file format might have been missed out. Maybe your images are in the format TIFF or something else. Make sure you add those missing extensions yourself. For instance, if I want to add support for tif, Iâll have to add this statement just below
The first option is if you want your wallpaper to change in sequential order ie., starting from the first image and continuing to the last. And then repeat the same process over and over. So you are not stuck with the last image when the loop runs out. Copy & paste the below code on the last line of your script file.
Your .change_wallpapers script is done. Now there is only one thing left to do; starting that script when you log in.
âFor that, we have to append some code on your .profile file to start that script. If you still you have your text editor opened, launch your .profile file and copy these four lines of code on the last line.
Later, you can press the same key combination to disable showing hidden files and folders from your file manager program.
After you are done, either reboot or re-login your session for the script to come into effect.