Variety is one of the best wallpaper changers from Peter Levi. Normally it just works out of the box on many known desktop environments. Since it did not work under i3 windows manager, I dived into the code and found an easy and quick fix to solve the issue.

Quick and dirty solution

All you need to do is change this code

into this code

Beware the “#” before two of the lines, meaning these codes will not be seen as program code and will not be executed.

Change the above code in the file “set_wallpaper” situated normally in


‘Cleaner’ solution

I wondered why it did not find “XDG_CURRENT_DESKTOP” variable.

Asking in the terminal for all environment variables with env  I got :

Change this code

into this code

$XDG_SESSION_DESKTOP is the correct variable !!



If you rather see what you need to do then here is a movie.