The latest Ubuntu systems use GNOME as a default theme. GDM3 is the default display manager which is responsible for loading the login screen. We need to tweak settings in gdm3 to change the background of the login screen.
This tutorial will help you to change the default login screen background on Ubuntu systems.
Install Required Tools
First of all, install a required library on your system.
sudo apt install libglib2.0-dev-bin
Now download the script that will help you with setting up the login screen background wallpaper on Ubuntu systems.
wget -qO - https://github.com/PRATAP-KUMAR/ubuntu-gdm-set-background/archive/main.tar.gz | tar zx --strip-components=1 ubuntu-gdm-set-background-main/ubuntu-gdm-set-background
To find out the command help run the following command:
./ubuntu-gdm-set-background --help
Change the Login Screen Background
You can set an image, solid color, and horizontal or vertical gradient color at the Ubuntu login screen running with Genome display manager (GDM).
Use one of the following commands to change the login screen background of your choice:
- Set an image – Use the following command to set an image to the login background.
sudo ./ubuntu-gdm-set-background --image /home/user/backgrounds/image.jpg
- Set a solid color – You can also set an solid color to Ubuntu login screen. Use the following command with hex color code. You can generate hex code here.
sudo ./ubuntu-gdm-set-background --color \#aAbBcC
- Set a horizontal gradient color – It also allows you to make gradient color with two colors. To set the horizontal gradent use following command:
sudo ./ubuntu-gdm-set-background --gradient horizontal \#aAbBcC \#dDeEfF
- Set a vertical gradient color – Vertical gradient of two colors can be set with command:
sudo ./ubuntu-gdm-set-background --gradient vertical \#aAbBcC \#dDeEfF
- Reset all changes – You can reset all changes to the original by running command:
sudo ./ubuntu-gdm-set-background --reset
Here are a few screenshots of the login screen after setting up with the above commands.



Conclusion
This tutorial helped you with changing the login screen background with custom colors on Ubuntu systems. You can revert all changes anytime to get the default login screen.
4 Comments
It works in POP OS 22.04?
Not working tried 3 times
hi dev, how to remove ubuntu logo in lockscreen?
Thanks for helping out, great info.