This question already has an answer here:

I want to know if it is possible to change the login screen background to an image, or if not, how to change the color from the default.

login screen, orange and purple

marked as duplicate by WinEunuuchs2Unix, Eric Carvalho, Fabby, Charles Green, David Foerster Jan 2 '18 at 22:35

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


I found these instructions on ubuntuhandhandbook.com

The good thing about GDM3 (and Gnome) is that it's designed to be modular, so pretty much everything can be customized and changed.

That being said in case you don't like how something looks, if you know CSS (or even SASS) chances are you can change it to whatever you like.

However bear in mind, that some of these changes aren't planned customization features, so an update can erase them completely (this could change in the future though.)

Alright, so in our case we'd like to change the login screen background for GDM3.

First thing would be to find what CSS rule is responsible for it, and in what file. Fortunately, someone has already done that (in that link at the beginning), so these instructions will be based on that.

The file we will be editing will be either /usr/share/gnome-shell/theme/gdm3.css, or /etc/alternatives/gdm3.css (the latter is just a symlink to the former).

I'm going to use the nano editor; you can do everything in it, and it's really practical, as it stays in the console.

First, open a console, then the file with nano:

sudo nano /usr/share/gnome-shell/theme/gdm3.css

(We'll have to have root access to edit this file, that's why we use sudo.)

Then we'll want to find the rule that's responsible for the lock screen background, it will be this one:

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

As you can see, the background is currently set to an image repeated multiple times, that's how you get the noise texture at the login.

If you know CSS, the rest of this "guide" will be useless for you.

Let's say, we'll want to change that noisy texture to a single picture stretched across the login screen. We can do that by changing the rule to this.

#lockDialogGroup {
    background: url(file:///path/to/your/picture.png);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center; 

Where the /path/to/your/picture.png part should be replaced with the actual path to the image you'd like to use, starting from the / root path. (Note that you need all the /-s after file:, as shown in the example.)

You're done. Press CTRL+X to save the file, and exit nano. After the next login, you should have the picture you set there.

In case you only want to set a solid color you can simply set:

#lockDialogGroup {
    background-color: #2c001e;

Where the #... part is a color code of your choice. (You can look up web color codes, if you don't know how they work, or use a color picker to get the desired color code.)

That's it. Note that while this should work, it was not tested by me, as I cannot use GDM at the moment due to an another issue that hasn't been fixed yet.

  • when i opened the gdm3.css i found it empty – Molham Mohamed Dec 31 '17 at 2:05
  • Are you sure you're editing the right file in either "/usr/share/gnome-shell/theme" or "/etc/alternatives/" ? It's not empty for me. However I cannot test whether it's actively used or not, as I'm not using GDM at the moment. – fecka Dec 31 '17 at 2:13
  • I used xhost +local: && sudo gedit /etc/alternatives/gdm3.css – Molham Mohamed Dec 31 '17 at 2:16
  • Since links can disappear, please add the relevant details from that link here. – Chai T. Rex Dec 31 '17 at 3:23
  • Fair point, gonna update the answer with the instructions. – fecka Dec 31 '17 at 10:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.