Home Linux How To Change GDM Login Screen Background In Ubuntu

How To Change GDM Login Screen Background In Ubuntu

By sk
1026 Views

Whenever you log in or lock and unlock your Ubuntu 18.04 LTS desktop, you will be greeted with a plain purple-colored screen. It is the default GDM (GNOME Display Manager) background since Ubuntu version 17.04. Some of you may feel boring to look at this plain background and want to make the Login screen something cool and eye-candy! If so, you're on the right track. This brief guide describes how to change GDM Login screen background in Ubuntu 18.04 LTS desktop.

Change GDM Login Screen Background In Ubuntu

Here is how the default GDM login screen background image looks like in Ubuntu 18.04 LTS desktop.

GDM login screen 1

GDM login screen with default background

Whether you like it or not, you will stumbled upon this screen every time you log in or lock and unlock the system. No worries! You can change this background with any beautiful image of your choice.

Changing desktop wallpaper and user's profile picture is not a big deal in Ubuntu. We can do it with a few mouse clicks in no time. However, changing Login/Lock screen background need a little bit editing of a file called ubuntu.css located under /usr/share/gnome-shell/theme directory.

Before modifying this file, take a backup of this file. So, we can restore it if something went wrong.

$ sudo cp /usr/share/gnome-shell/theme/ubuntu.css /usr/share/gnome-shell/theme/ubuntu.css.bak

Now, edit ubuntu.css file:

$ sudo nano /usr/share/gnome-shell/theme/ubuntu.css

Find the following lines under the directive named "lockDialogGroup" in the file:

#lockDialogGroup {
   background: #2c001e url(resource:///org/gnome/shell/theme/noise-texture.png);
   background-repeat: repeat; 
}
ubuntu_css

Editing ubuntu.css file

As you can see, the default image for the GDM login screen is noise-texture.png.

Now, change the background image by adding your image path. You can use either .jpg or .png file. Both format images worked fine for me. After editing the file, the contents of file will look like below:

#lockDialogGroup {
   background: #2c001e url(file:///home/sk/image.png);
   background-repeat: no-repeat; 
   background-size: cover;
   background-position: center;
}

Please pay little attention to the modified version of this directive in the ubuntu.css file. I have marked the changes in bold.

As you might have noticed, I have changed the line "...url(resource:///org/gnome/shell/theme/noise-texture.png);" with "...url(file:///home/sk/image.png);". I.e You should change "...url(resource..." to "...url(file..".

Also, I have changed the value of "background-repeat:" parameter from "repeat" to "no-repeat" and added two more lines. You can simply copy/paste the above lines and change image path with your own in your ubuntu.css file.

Once you are done, save and close the file. And, reboot your system.

Here is my GDM login screen with updated backgrounds:

Updated GDM login screen

Updated GDM login screen

Cool, yeah? As you can see, changing GDM login screen is not that difficult either. All you have to do is to change the path of the image in ubuntu.css file and restart your system. It is simple as that. Have fun!

You can also editΒ gdm3.css file located under /usr/share/gnome-shell/theme directory and modify it as shown above to get the same result. Again, don't forget to take the backup of the file before making any changes.

Thanks for stopping by!

Help us to help you:

Have a Good day!!

You May Also Like

15 comments

PyDan November 24, 2018 - 9:49 am

Can you share block screen backgound on your article?

Reply
sk November 24, 2018 - 11:48 am

I am sorry. I deleted the image already. I couldn’t remember where did i get it. I will search my collection and send if I find it.

Reply
Lubomir Herko March 26, 2019 - 7:04 pm

Just look something up on unsplash.com πŸ™‚

Reply
Devendra November 28, 2018 - 10:01 am

Hi nice article but i think changing the login background image results in slowing of login and even starting up of Ubuntu machine

Reply
Venkatesh December 19, 2018 - 3:29 pm

I tried this but now the login screen collapsed totally. images are displaying in waves. username and password field design collapsed. I tried to reset with old code and restarted the system. but noting worked out. How to resolve that now.? anyone faced the same issue here…!!!

Reply
ch3tManly January 17, 2019 - 11:52 am

Venkatesh, same exact thing happened to me

Reply
Tony Silveira November 6, 2019 - 8:50 pm

Worked fine for POP_OS! I edited /usr/share/gnome-shell/theme/pop.css

Reply
sk November 7, 2019 - 12:19 pm

Thank you, Tony.

Reply
thiggy01 November 16, 2019 - 7:21 am

I created a script to automate this process of changing your gdm login screen background. Instructions on installation and usage can be found in https://github.com/thiggy01/gnome-change-login-background

Reply
sk November 16, 2019 - 12:57 pm

Thanks for making this script. I will try it when I have time.

Reply
Shane November 17, 2019 - 10:10 pm

Doesn’t work on the latest releases of Gnome and GDM πŸ™

Reply
sk November 18, 2019 - 2:05 pm

Thanks for the heads up, Shane. I will check it on latest GNOME and update the guide accordingly soon.

Reply
Mike January 29, 2020 - 11:33 pm

If I have two or three screens how can I show the image in each screen instead of extending the same image through all screens

Reply
DrEmmettBrown March 17, 2020 - 7:27 pm

dude , it’s not changing even saying “it changed successfully”.

There is something wrong.

Reply
Shane April 4, 2020 - 5:55 am

This actually works on POP_OS! 19.10 but Tony’s instructions do not. Thanks!

Reply

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More