41

Recently I installed Ubuntu 17.10 which comes with Gnome as the default DE and I like it a lot but cannot figure out how to change the purple background of the lock screen (when typing in the password).

lockscreen image

I've tried reconfiguring GDM but it seems to be different and it only affects the login screen.

If there is no solution I'm interested in ANY workaround because this purple drives me crazy but I don't want to drop GNOME entirely just because of this. Any help is highly appreciated.

0

3 Answers 3

31

From these steps here, you can change both the image and the background colour:

  1. Move your favorite image to /usr/share/backgrounds:

    • It's better to move the image you want to set as login background to system pictures folder: /usr/share/backgrounds. To do so, open terminal via Ctrl+Alt+T, then either run command:

      sudo cp /PATH/TO/IMAGE /usr/share/backgrounds/
      
  2. Edit the css file that define GDM login background:

    • Open terminal (Ctrl+Alt+T) and run command to edit file /etc/alternatives/gdm3.css, which is linked to /usr/share/gnome-shell/theme/gdm3.css:

      # Make backup first before editing
      sudo cp /etc/alternatives/gdm3.css /etc/alternatives/gdm3.css.bakup
      sudo nano /etc/alternatives/gdm3.css
      

      enter image description here

  3. When the file opens, go to menu (right after ‘Save’ button) -> find and find out following section:

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

    change the lines into:

    #lockDialogGroup {
       background: #000000 url(file:///usr/share/backgrounds/Aardvark_Wallpaper_Grey_4096x2304.png);
       background-repeat: no-repeat;
       background-size: cover;
       background-position: center; }
    

    Replace Aardvark_Wallpaper_Grey_4096x2304.png with your picture file name, and or change the hex colour code ##2c001e to the color of your choice.Here I used black.

    enter image description here

Lockscreen background:

enter image description here

Note: Backup all files before changing them

20
  • 3
    Thanks, but this is only changing the login screen and not the lock screen. If there is a way to show that every time I suspend my laptop that's good enough but the preferred way would be to change the lock screen. I know there's a config file for that but I'm unable to find it. Nov 29, 2017 at 22:25
  • 1
    Already tried that but the purple lock screen (note: the lock screen, not the login screen) remains unchanged. Nov 29, 2017 at 23:06
  • 1
    Yes, and the login screen has changes accordingly but not the lock screen. Nov 29, 2017 at 23:08
  • 1
    OMG, I restarted it again and now it's working properly! Thanks! Nov 29, 2017 at 23:16
  • 2
    At the top of the file it says "This stylesheet is generated, DO NOT EDIT", why you encourage to still edit this file?
    – luukvhoudt
    Oct 26, 2018 at 10:04
4

Run: sudo update-alternatives --config gdm3.css and choose the option 1 (or the one with the path to gnome-shell.css file) as seen below:

command

Reboot and Ok, you're good to go.

4
  • 1
    Mine says nothing to config... Nov 29, 2017 at 23:05
  • 3
    "option 1" most probably won't be the same for everyone. Could you please edit your answer and mention clearly which option to choose?
    – pomsky
    Nov 30, 2017 at 2:01
  • Ok! Answer edited ! Nov 30, 2017 at 18:45
  • 1
    If you only have one option, run this command first sudo apt install ubuntu-gnome-desktop Jul 1, 2018 at 21:44
1

In a shell, type:

sudo update-alternatives --config gdm3.css

You will get a screen asking for alternative gdm3.css. Select the one with gnome-shell.css.

For example mine is

7
  • Could you please post text files, dialogue messages, and program output listings as text, not as images? To achieve the latter two you can either 1) select, copy & paste the dialogue text or terminal content or 2) save the program output to a file and use that. Thanks. Nov 30, 2017 at 9:34
  • 3
    On another note, that's the same as Renê’s answer. Please don't duplicate existing answers. Nov 30, 2017 at 9:35
  • 2
    This is much better than Rene's answer which doesn't meaningfully say which option to choose
    – Zanna
    Nov 30, 2017 at 10:33
  • Please note that on Ubuntu 17.10 there is no such option. Only ubuntu.css and this is a way less flexible solution than George's Nov 30, 2017 at 12:11
  • 1
    -1. This doesn't allow one to change the purple background, as far as I can tell. Perhaps more detail (especially on the outcome?) would aid clarity here? Jan 2, 2018 at 18:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .