How to change wallpaper in Ubuntu based on local weather or time

Last Updated on April 18, 2021 by admin

While there are users that just don't care about wallpapers, there's also a bunch which is very specific when it comes to their desktop backgrounds. If you fall in the latter category, we have something very interesting for you: a tool that changes wallpaper based on local weather or time.

In this tutorial, we will discuss how you can install and use this tool. But before we do that, it's worth mentioning that all the instructions mentioned henceforth have been tested on Ubuntu 14.04 LTS.

How to install and use WeatherDesk

Yes, the tool we'll be discussing is WeatherDesk. It's nothing but a Python script. To download the tool, head to the project's official GitHub page. The downloaded file should be in archive form, so you'll need to extract the contents first.

Once the download and extraction work is done, enter the extracted directory, and look for a file named ''. That's the script that you need to run. But wait, before you start using the tool, you need to have some relevant wallpapers as well.

The developer suggests downloading a set called FireWatch, something which you can do by clicking this link. You can put these wallpapers in the default ~/.weatherdesk_walls/ directory. Alternatively, you can also put the wallpapers in any other directory, but in that case you'll have to specify the directory name with the --dir option.

For example, in my case, I executed the following command:

./ --dir /home/himanshu/Downloads/FireWatch-WeatherDesk-Pack-master/ --city Chandigarh

Note that I got a "Finding city from IP failed!" error when I first executed the tool, so I explicitly mentioned my city name using the --city flag.

Here's the information that the tool displayed on the command line:


And here's the wallpaper:

You can also tweak the tool to change wallpapers based on time. For this, use the -t option.

-t {2,3,4}, --time {2,3,4}
Use different backgrounds for different times.

2 = day/night
3 = day/evening/night [Default]
4 = morning/day/evening/night

For more information on the tool, including how to direct it to use your own set of wallpapers, head here.

Leave a Comment