30

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.

26

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

  • 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. – Balázs Sáros Nov 29 '17 at 22:25
  • 1
    Already tried that but the purple lock screen (note: the lock screen, not the login screen) remains unchanged. – Balázs Sáros Nov 29 '17 at 23:06
  • 1
    Yes, and the login screen has changes accordingly but not the lock screen. – Balázs Sáros Nov 29 '17 at 23:08
  • 1
    OMG, I restarted it again and now it's working properly! Thanks! – Balázs Sáros Nov 29 '17 at 23:16
  • 1
    At the top of the file it says "This stylesheet is generated, DO NOT EDIT", why you encourage to still edit this file? – Fleuv Oct 26 '18 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.

  • 1
    Mine says nothing to config... – George Udosen Nov 29 '17 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 '17 at 2:01
  • Ok! Answer edited ! – Renê Barbosa Nov 30 '17 at 18:45
  • 1
    If you only have one option, run this command first sudo apt install ubuntu-gnome-desktop – Waylon Flinn Jul 1 '18 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

  • 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. – David Foerster Nov 30 '17 at 9:34
  • 3
    On another note, that's the same as Renê’s answer. Please don't duplicate existing answers. – David Foerster Nov 30 '17 at 9:35
  • 2
    This is much better than Rene's answer which doesn't meaningfully say which option to choose – Zanna Nov 30 '17 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 – Balázs Sáros Nov 30 '17 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? – starbeamrainbowlabs Jan 2 '18 at 18:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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