The latest GNOME already has a feature that automatically changes the wallpaper throughout the day very much like Windows 10. Since GNOME is the default desktop in Ubuntu now, this feature is available on Ubuntu by default. However, unlike Windows 10, there isn’t a feature that allows you to automatically change wallpapers from your own collection. Not without the help of a third-party script or tool at least. In this case, the third-party script you will need is called LittleSimpleWallpaperChanger or LSWC that lets you automatically change wallpapers on Ubuntu.
LSWC is a small, very light-weight script that runs in the background and it will automatically change wallpapers from the user-specified folder. The wallpapers are set to change at random intervals between 1 to 5 minutes. The setup is pretty easy and once done, you can forget about the script. Before you start with the installation though, you should probably create a folder containing all the different wallpapers that you want to switch amongst. Make sure all the images are in jpg or jpeg format because only those are supported.
Download and Install LSWC
- You can download the script from GitHib. This will give you a zip archive file.
- Right-click on it and select Extract here.
- Open the extracted folder in a terminal. You can do this by launching the Terminal and then navigating to the folder using the cd command or by opening the folder in Nautilus, right-clicking an empty space and selecting Open in Terminal.
- Regardless of how you open the folder inside a Terminal, once you do, copy and paste this command in the Terminal and hit enter.
- A dialogue box should now appear asking you to locate the folder that you want to use as your wallpaper source. Click on it and select the folder where you’ve kept your selected wallpapers. If you prefer you can set the Wallpapers folder in Pictures as the source folder. Any images that you set as wallpaper are automatically transferred to this folder. This means you can easily add to your collection by simply setting an image as the wallpaper.
- The script starts working right away as soon as you select the folder. If it doesn’t, try rebooting the computer.
Don’t miss these:
How to Change Wallpapers on Ubuntu using LSWC
During installation, you have already selected the source folder for wallpapers. You can still add or remove wallpapers from this folder and the script will continue to switch between available images. However, you can’t now change the name or location of the selected folder as you please. That’ll break the script, for obvious reasons. If you want to change the source folder or rename it, you’ll need to edit a file named homepath.conf found in /home/.config/lswc/. You may have to press Ctrl+H in your home folder to see the .config folder. Navigate to the file and double-click on it to open it.
The file contains nothing but the path to your selected source folder. You can edit and save the file anytime you want to change the location.
Another way you can do this is by simply deleting the homepath.conf file and running the script again.
The time interval before wallpapers are changed can also be modified. To do that, open the lswc file in a text editor and scroll down all the way to the bottom. Look for the following line.
loop_run = round((random.random() * 4 ) + 1) * 60
To change the time interval, just change the + 1 to + 2 or + 3 etc. Below that, you’ll find the line sleep(loop_run). This can also be modified to something like sleep(1), sleep(2) or sleep(3) etc.
Compatibility is something one kind of has to worry about on Linux. There are so many distros that can be quite different from each other and just as many desktop environments. LSWC is based on GTK so it should work not only on Ubuntu but any Linux distro as long as it uses GNOME desktop. The GitHub repos also contain specific versions for Lubuntu 2020 and MATE 2020 if you prefer the Lubuntu or MATE desktop environments over GNOME.
How to remove LSWC
If you decide you don’t need all the pre-defined randomness on your desktop, say you find a wallpaper you want to keep for a while, you’ll need to remove LSWC. For this, first, stop the script with the following command.
With hidden files visible in your home folder (press Ctrl+H if they aren’t) navigate to and delete the following files and folders from the mentioned folders.
- scripts folder from .local
- lswc folder from .config
- lswc.desktop file from .config/autostart
That’s pretty much all you have to do to change wallpapers on Ubuntu automatically.
Read Next: Best Live Wallpaper Apps for Android