How to Change Login Screen Background Color / Wallpaper in Ubuntu 21.10

Last updated: January 22, 2022 — 7 Comments

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

And “--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!

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via ubuntuhandbook1@gmail.com Buy me a coffee: https://ko-fi.com/ubuntuhandbook1

7 responses to How to Change Login Screen Background Color / Wallpaper in Ubuntu 21.10

  1. The initial wget command from the article comes back with a 404 for me. Preceded by a “381”: moved permanently.

  2. Thank you ! It’s working for me

  3. 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’

    thanks

  4. 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.

Leave a Reply

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

*