How to Change Login Screen Background Wallpaper in Fedora / Ubuntu

For those boring with the default login screen appearance, you may change the background wallpaper to let is shine again.

For the login screen in GNOME, the default desktop of Ubuntu & Fedora workstation, it’s not so beginner friendly. Because the settings are hidden deeply and NOT easy to configure for normal users due to permission issue. For the login background, it even does not have an option to change it.

The login screen is handled by Gnome Display Manager (aka GDM). It uses CSS (Cascading Style Sheets) file to describe how to GDM elements are displayed when you’re at login. Users used to hack the gdm3.css file to check its background. However, recent GNOME releases packed the CSS into a “.gresource” file. Users have to extract the CSS from it, edit the file, then re-pack it into another .gresource file and finally choose it as the GDM theme.

Since the process is NOT easy for beginners, a few open-source scripts has been created to do the job. And here’s how to use it to change the login screen background wallpaper in Fedora and Ubuntu.

Change Login Background in Fedora:

For Fedora workstation users, an open-source project was created to do the trick. The developer created a Copr (Cool Other Package Repo) repository that contains the packages so far for Fedora 33, 34, 35, and rawhide.

1.) Firstly, click on the top-left corner ‘Activities’ button to bring up the overview screen. Then search for and open terminal.

2.) When terminal opens, copy and paste the command below into it and hit Enter to add the repository to your system:

sudo dnf copr enable zirix/gdm-wallpaper

Since sudo command need user authentication, it will ask you to type user password to get pass. Then follow the terminal outputs and confirm adding the repository.

3.) Next, install the gdm-wallpaper script into your system by running command:

sudo dnf install gdm-wallpaper

4.) After installation, you can set a photo image as login background at any time by running a single command in terminal:

sudo set-gdm-wallpaper /PATH/TO/IMAGE
NOTE: replace /PATH/TO/IMAGE in the command with the file path. You may simply drag and drop an image from file manager into terminal window instead of typing it manually.

Restore login background in Fedora:

In case for login issues, the script creates a backup of the original .gresource theme file. So you can just copy the backup back to its position will restore the wallpaper.

To do so, press Windows (or Super) key on keyboard, then search for and open terminal from overview screen. When terminal opens (or press Ctrl+Alt+F3 to get into command console), run command:

sudo cp /usr/share/gnome-shell/gnome-shell-theme.gresource.backup /usr/share/gnome-shell/gnome-shell-theme.gresource

And if you do not require the wallpaper changer anymore, uninstall it via command:

sudo dnf remove gdm-wallpaper

Also remove the copr repository if you want by running command in terminal:

sudo dnf copr remove zirix/gdm-wallpaper

How to Change Login Screen Background in Ubuntu:

Ubuntu has its own GDM theme instead of the default one for Gnome. So the previous script does not work, and another one is created that so far supports for Ubuntu 20.04, Ubuntu 20.10 (End of Life), and Ubuntu 21.04. For Ubuntu 21.10 support, wait until the developer updated it.

1.) Firstly, press Ctrl+Alt+T on keyboard to open terminal. When it opens, run command to download the script:

wget github.com/thiggy01/change-gdm-background/raw/master/change-gdm-background

Install wget command line download manager if you don’t have it via command: sudo apt install wget.

2.) Next add executable permission to the file via command:

chmod +x change-gdm-background

3.) And to set an image as login background, use command:

sudo ./change-gdm-background /PATH/TO/IMAGE

You can also drag & drop image from file manager into terminal instead of typing file path manually.

For using the script later, you can move it to /usr/local/bin directory via command:

sudo mv change-gdm-background /usr/local/bin/

So you’ll be able to run this command anywhere to set login background:

sudo change-gdm-background /PATH/TO/IMAGE

Restore login background in Ubuntu:

The script has option to restore the changes. Until you have removed the script, you can restore the background by running the command below in terminal (press Ctrl+Alt+T to open terminal):

sudo ./change-gdm-background --restore

Or use this command instead if you have to move it to /usr/local/bin:

sudo change-gdm-background --restore

And you may remove the script using file manager or by running command in terminal if you don’t need it any more.

sudo rm /usr/local/bin/change-gdm-background
Exit mobile version