How can I change the purple background color of the lock screen on Ubuntu 17.10?
Solution 1
From these steps here, you can change both the image and the background colour:
-
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 viaCtrl+Alt+T
, then either run command:sudo cp /PATH/TO/IMAGE /usr/share/backgrounds/
-
-
Edit the css file that define GDM login background:
-
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 thehex colour code ##2c001e
to the color of your choice.Here I used black.
Lockscreen background:
Note: Backup all files before changing them
Solution 2
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:
Reboot and Ok, you're good to go.
Solution 3
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
.
Related videos on Youtube
Balázs Sáros
Updated on September 18, 2022Comments
-
Balázs Sáros over 1 year
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).
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.
-
Balázs Sáros over 6 yearsThanks, 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.
-
George Udosen over 6 yearsSee my updated answer to change the lock screen image!
-
Balázs Sáros over 6 yearsSadly that's still not that. You can change the "overlaying" image but nut the purple color when you type in the password (as seen in the included picture).
-
George Udosen over 6 yearsOk I see let me look around!
-
George Udosen over 6 yearsTo change the color change that
hex
code before the image and restart your system -
George Udosen over 6 yearsMine says nothing to config...
-
Balázs Sáros over 6 yearsAlready tried that but the purple lock screen (note: the lock screen, not the login screen) remains unchanged.
-
George Udosen over 6 yearsDid you restart your system? Works on my end...
-
Balázs Sáros over 6 yearsYes, and the login screen has changes accordingly but not the lock screen.
-
George Udosen over 6 yearsOn my end both have changed see the image I added!
-
Balázs Sáros over 6 yearsOMG, I restarted it again and now it's working properly! Thanks!
-
pomsky over 6 years"option 1" most probably won't be the same for everyone. Could you please edit your answer and mention clearly which option to choose?
-
WinEunuuchs2Unix over 6 yearsSmall point perhaps but instead of
PATH/TO/YOUR/IMAGE
I would use/PATH/TO/IMAGE
or something similar with a/
prefix. -
George Udosen over 6 years@WinEunuuchs2Unix updated it, very good suggestion!
-
David Foerster over 6 yearsCould 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 over 6 yearsOn another note, that's the same as Renê’s answer. Please don't duplicate existing answers.
-
Zanna over 6 yearsThis is much better than Rene's answer which doesn't meaningfully say which option to choose
-
Balázs Sáros over 6 yearsPlease 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
-
Renê Barbosa over 6 yearsOk! Answer edited !
-
Renê Barbosa over 6 yearsBalázs, I've tested with Ubuntu 17.10 and the update-alternatives thing is working fine..
-
Will I Am over 6 yearsIn my dual-monitor setup, the above CSS mod put the wallpaper half on the left monitor and half on the right monitor. This will probably not work unless I get a dual-monitor wallpaper.
-
Asifa.K over 6 years-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?
-
Waylon Flinn almost 6 yearsIf you only have one option, run this command first
sudo apt install ubuntu-gnome-desktop
-
Fernando Santucci over 5 yearsThe Lock Screen is ok! However the Splash Screen keep purple on boot. Do you know how change that purple background color? I think not to be in GDM.
-
Fernando Santucci over 5 yearsMaybe tweaking the Grub2 bootloader USplash theme?!
-
Tom Mercer over 5 yearsI'm experiencing "the purple lock screen (note: the lock screen, not the login screen) remains unchanged. " I'm using real GNOME, so my lockDialogGroup is using a dark grey color, not the hideous Ubuntu purple. This is used for the login login screen, and it is indeed grey, GNOME default. However, lock login screen is still ugly purple. I find no Ubuntu purple (2c001e) anywhere in my gdm3.css file. It must be controlled from somewhere else, or Ubuntu purple has changed.
-
beruic over 5 yearsThis does not work on Ubuntu 18.04. There is only one alternative.
-
luukvhoudt over 5 yearsAt the top of the file it says "This stylesheet is generated, DO NOT EDIT", why you encourage to still edit this file?
-
Daniil Lopatin over 5 yearsFor Ubuntu 18.04! I did changes and was not able to start gnome session. It gives me error: "GLib: g_hash_table_find: assertion 'version == hash_table->version' failed" (found by running command
journalctl -r
). I didn't make a copy, my fault. I stopped gnome sessionsudo service gdm stop
and checked alternatives for gdm3.css (sudo update-alternatives --config gdm3.css
). There was only one provided by Ubuntu. So I added one more:sudo update-alternatives --install /usr/share/gnome-shell/theme/gdm3.css gdm3.css /usr/share/gnome-shell/theme/gnome-shell.css 2000
and started gnome session. -
Sun Bear over 4 yearsWhich directory does
resource:///org/gnome/shell/theme/
points to? -
Sun Bear over 4 yearsMy question was asked and answered here