Make Your Linux Desktop Look Beautiful With Dynamic Wallpaper

Linux might not be the first operating system that comes to your mind when speaking of customizations, but it is quite the contrary. While most Linux distributions may seem plain and boring on the first boot, there are countless customization options to make your desktop pop and look unique.

If you’re a proficient Linux user, you might have realized that Linux can offer more personalization depending on the desktop environment and window manager you use. Let’s take the first step towards a better desktop appearance and switch to dynamic wallpapers.

What Is Dynamic Wallpaper?

Static wallpapers are those wallpapers that do not change automatically over a period of time. These are the type of wallpapers that come built-in with your Linux distribution and desktop environment. However, you can go beyond the regular static wallpapers and make a leap towards dynamic wallpapers.

Dynamic Wallpaper is a simple bash script that allows you to set wallpapers according to the current time, using a cron job scheduler. Confused about what that means? In a nutshell, it allows you to set different wallpapers for different times of the day. Imagine using a brighter version of wallpaper during the day and a darker one at night. With Dynamic Wallpaper, you can make your desktop look reactive.

Even though there are over 25 different wallpaper sets of various resolutions, from HD to 5K, you can also create your own wallpaper set for a custom look. It also supports pywal, a tool that generates a color palette from the dominant colors in an image and then applies the colors system-wide and on all of your favorite programs. 

Can You Use Dynamic Wallpaper?

Most Linux desktop environments and window managers support Dynamic Wallpaper. Here’s an official list of all the desktop environments and window managers that Dynamic Wallpaper works with:

Desktop Environments:

  • KDE
  • Pantheon
  • GNOME
  • Deepin
  • Cinnamon
  • Xfce
  • LXDE
  • MATE

Window Managers:

  • Openbox
  • i3wm
  • bspwm
  • AwesomeWM
  • Fluxbox
  • FVWM
  • Sway

Don’t worry if your desktop environment or window manager is not on this list. You can still give it a try and use the test script to confirm if it works on your system.

Install Dynamic Wallpaper on Linux

Before you start installing dwall (Dynamic Wallpaper), you’ll have to install all the necessary dependencies for it to work properly. Depending upon the Linux distribution you’re running, run either of the two commands given below to install the dependencies.

For Arch Linux and Arch-based distributions:

sudo pacman -Sy feh cronie python-pywal xorg-xrandr

If you’re not running the Xfce desktop environment, feel free to remove the xorg-xrandr package from the above command as you won’t require it if you’re using other desktop environments. You can also remove pywal if you do not plan on using it.

For Ubuntu and other Debian-based distributions:

sudo apt-get install x11-xserver-utils feh cron

Similarly, you can remove the x11-xserver-utils package if you’re not running the Xfce desktop environment.

Now that you have all the dependencies installed, it is time for you to install the actual dwall tool. This is a straightforward process, and you can start by cloning the git repository. Here’s how to do that:

git clone https://github.com/adi1090x/dynamic-wallpaper.git
cd dynamic-wallpaper

If you want to test the bash script before you proceed to install it, you can run the test.sh script with the following command:

./test.sh

As you might’ve noticed, you can choose from over 25 different wallpaper sets. For example, if you want to apply the factory wallpaper set for testing the script, you can run this command:

./test.sh -s factory

You will notice that your wallpaper has automatically been changed to your desired wallpaper set depending upon the time of day.

After testing, you might want to install the script if you didn’t face any issues. Inside the directory, you will find a dedicated install.sh script for exactly this purpose. To install dwall, all you have to do is run this script.

./install.sh

And there you go. You have successfully installed dwall on your Linux machine. You can switch between different wallpaper sets, and dwall will automatically apply the appropriate wallpaper from the set depending upon the time.

But that’s not all. At the moment, you will manually run the dwall script every few hours to update your wallpaper. To avoid this, you can set up a cron job and automate this process, which you will see in the next section.

Dynamic Wallpaper Automation With Cron Jobs

Finally, to switch the wallpapers automatically, you will need to set up a cron job. Cron is a Linux command that you can use to schedule the execution of commands or tasks sometime in the future repeatedly. In your case, you’ll need a cron job to run dwall every hour. You can start by enabling the cron service on your system using the commands given below.

On Arch-based distributions:

sudo systemctl enable cronie.service --now

To enable the cron service on Ubuntu and other Debian-based distros:

sudo systemctl enable cron

Once it’s done, you will need to find out the values of some environment variables before you can proceed to create a cron job. Run this command on your terminal and note down the values:

echo "$SHELL | $PATH | $DISPLAY | $DESKTOP_SESSION | $DBUS_SESSION_BUS_ADDRESS | $XDG_RUNTIME_DIR"

The output on your terminal might be different than the one shown in the image above. Do not worry about that as it differs across different devices. Now that you’re good to go, let’s create a cron job using crontab.

crontab -e

You’ll see a text editor open up for you to add a new cron job. Paste the command given below to the editor but make sure to replace the environment variables with your own values.

0 * * * * env PATH= DISPLAY= DESKTOP_SESSION= DBUS_SESSION_BUS_ADDRESS="" /usr/bin/dwall -s 

In the above command, make sure to replace all the values inside <> with your own environment variables and remove the <>. And that’s it, you have successfully created a cron job for switching your wallpaper dynamically.

To remove your previous cron job and use a different wallpaper set, you can run the following commands:

crontab -r
crontab -e

A text editor window will show up again. This time, you can choose a different wallpaper set by replacing the variable with a new value.

Enjoy a Lively Desktop With Dynamic Wallpaper

Dynamic wallpapers are one of the best ways to get started with personalizing your Linux experience. With a customization-centric desktop environment like KDE Plasma or a window manager like i3, you can even take it to the next level. It does require a bit of tinkering from your side though.

Fancy the macOS look and feel instead? Guess what, Linux can do that too. Here’s a roundup on how you can customize your GNOME, Xfce, KDE Plasma, Unity, or Cinnamon desktop environment to mimic the macOS appearance.

Author: Nitin Ranganath

Source: Nitin Ranganath.” Make Your Linux Desktop Look Beautiful With Dynamic Wallpaper”. Retrieved From https://www.makeuseof.com/make-your-linux-desktop-look-beautiful-with-dynamic-wallpaper/

All Rights Of This Article Reserved To MakeUseOf

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: