UPDATE: This script does not update for Ubuntu 22.04 support! Use this one instead for the new LTS.
This simple tutorial shows how to easily change the login screen background wallpaper or solid color in Ubuntu 20.04 Gnome desktop.
There’s no setting option to change GDM3 login screen background unless hacking on the the style sheet file, though it was fairly straightforward to edit the content in Ubuntu 18.04 and Ubuntu 19.10.
In Ubuntu 20.04, you have to extract the css file from current theme’s
.gresource file, then edit the content and recompile to create the new
.gresource file, and finally set it as default.
Change Login screen background via script:
Thankfully, there are a few scripts in Github to make things simple. And here’s the one that works on Ubuntu 20.04, Ubuntu 20.10, and Ubuntu 21.04.
1.) First open terminal via Ctrl+Alt+T key combination and run command to install the required libraries:
sudo apt install wget libglib2.0-dev-bin
2.) Then download the script via wget command line downloader:
you can also download the script in github web page.
3.) After downloaded the script, add executable permission to the file by running command:
chmod +x change-gdm-background
4.) And finally run command to set your photo image as login background:
sudo ./change-gdm-background /PATH/TO/IMAGE
Besides typing the path to image manually, you can type “sudo ./change-gdm-background” in terminal, then hit space bar to input a blank space, and finally drag & drop the image from file manager to terminal window.
Type user password (no visual feedback) when it asks and hit Enter. IMPORTANT: After successfully changed the login screen background, it asks whether to restart GDM to apply changes. Answer yes will log out current session, so it’s important to backup your work before hitting enter!
3.(Optional) To restore changes, run command:
sudo ./change-gdm-background --restore
Save the script for future use:
If you like the script and want to keep it for user later, run command to copy it to /usr/local/bin directory:
sudo cp change-gdm-background /usr/local/bin
After that, you can run the script any time in terminal window via:
sudo change-gdm-background /PATH/TO/IMAGE