Many users do not like the purple background in GDM login screen. Here’s how to change it to another image or color in Ubuntu 21.10 Impish Indri.
Since GNOME made it hard to hack the GDM login background, some scripts born in Github.com to help users to get rid of the boring purple screen in Ubuntu. And, here’s the one created for Ubuntu 21.10, that support set an image, single color, or gradient color as login background.
Download the script:
Press Ctrl+Alt+T on keyboard to open terminal. Then run command to download the script:
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
or you may download from the github page using web browser.
Once you got it, add executable permission by running command:
chmod u+x ubuntu-gdm-set-background
Change login screen background via the script:
Finally you may run command to set an image as login screen background:
sudo ./ubuntu-gdm-set-background --image PATH/TO/IMAGE
Instead of typing path to image file manually, just drag and drop it into terminal will do the trick.
Or, set a single color via command (replace the color value #ABCABC):
sudo ./ubuntu-gdm-set-background --color \#ABCABC
To set gradient color, use either one of the commands below:
sudo ./ubuntu-gdm-set-background --gradient horizontal \#aAbBc \#dDeEfF
sudo ./ubuntu-gdm-set-background --gradient vertical \#aAbBcC \#dDeEfF
--reset” flag is available to restore the change:
sudo ./ubuntu-gdm-set-background --reset
If everything goes well, it will output something like this:
seems 'background change is successful' Changes will be effective after a Reboot (CTRL+ALT+F1 may show the changes immediately) If something wrong, logon to tty and run the below command sudo update-alternatives --quiet --set gdm-theme.gresource /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource
As it indicates, it you get login issue after running this script. Press Ctrl+Alt+F3 to switch into TTY console, manually type user & password to login, and restore via command:
sudo update-alternatives --quiet --set gdm-theme.gresource /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource
That’s it. Enjoy!
The initial wget command from the article comes back with a 404 for me. Preceded by a “381”: moved permanently.
Sorry for the mistake. Updated with the correct link.
But once I got the script from github with my browser, I was able to install an image to replace the ugly purple. Thanks so much!
Thank you ! It’s working for me
2022–0107, I am getting this error (as of today at least):
./ubuntu-gdm-set-background: 8: Syntax error: newline unexpected
on a new Impish installation. Can you help? Also there is a name mismatch: wget refers to ‘ubuntu’ script, where as subsequent commands refer to ‘impish’
the actual wget command is
The one in the article downloads the html page.
The subsequent commands are then also with ubuntu-gdm-set-background and not impish-gdm-set-background
See the github page of the person that wrote the script. It lists the correct commands. (https://github.com/PRATAP-KUMAR/ubuntu-gdm-set-background)
You’re telling me to download a file from a remote repository and run it with sudo?
THAT’S SUPER DANGEROUS!!
If the repository’s owner is malicious (or if it get hacked), they can change the source code and you’ll be installing viruses in your computer.