How do I change login screen purple color to another one or image (if possible) on Ubuntu 17.10? [duplicate]

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


Solution 1:

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.