Why Change the Login Screen?

You might have noticed that, like all the previous versions, the latest versions of Ubuntu like Ubuntu 17 and 18 also come with a very plain looking login screen. Whether you like it or not, you have to encounter this purple-colored screen every time you log in or lock and unlock your system. If you, like me, are the kind of person who likes to customize desktop backgrounds, wallpapers, and lockscreens to something more eye-pleasing, you would certainly wish to enhance this seemingly plain-looking site.

Although, changing backgrounds and lock screen is made very simple in the latest release of Ubuntu, changing the login screen is the real deal. Even when you change the lock screen through the user interface, the login screen still keeps the purple face intact.

Ubuntu Lock screen

In this tutorial, we will demonstrate how to change the login and lock screens to something more friendly. All we need to do is edit the ubuntu.css file which is responsible for controlling the layout for the login page, among other things. We are running this tutorial on an Ubuntu 18.04 system. All you need to run this tutorial is a new .png file that you will be using as your new background. Please download this file if it is already not present in your system.

How to Change the Ubuntu Login screen

In order to change your login screen , follow these steps:

The first thing we need to do is modify the ubuntu.css file located under /usr/share/gnome-shell/theme. Open the Terminal application through Ubuntu Dash or by pressing Ctrl+Alt+T

Enter the following command to open the css file in gedit.

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

Alternatively, you can use your favorite text editor to open this file. The file will open as follows through the gedit command:

Open ubuntu.css file

Search for the term ‘lockDialog’ by pressing Ctrl+D and entering this keyword in the search bar. This way you will be directed to the location where we want to make the required changes. This is the section of the file we will be editing: lockDialogGroup

You can see that the file noise-texture.png specifies the default image that Ubuntu uses as the lock and login screen background.

You need to replace the above-mentioned lines with the following ones:

#lockDialogGroup {
background: #2c001e url(file:///[fileLocation/filename.png]);
background-repeat: no-repeat;
background-size: cover;
background-position: center;
}

Replace the [fileLocation/filename.png] part with the location and filename of the image you want to use as the new background.

You can see how our css file looks after we have made the changes:

Updated css

Save this file by clicking the Save button located at the top right corner of the text editor.

Restart your computer for these changes to take effect.

Now when you log in to your system, you will be able to see the newly set up background instead of the default Ubuntu login image. Our new login and lock screen looks like this after the changes we made through this tutorial:

Customized Ubuntu Lock Screen

So, as you have seen, changing the login background is not as difficult as it seems. You simply need to edit the ubuntu.css file and restart the computer in order to make this supposedly technical customization.

How to Change Login/Lock screen background in Ubuntu 18.04