Change login screen purple background 18.10

6,840

to change the login screen color equivalent to those 15 colors which are available when we open Settings>Background>LockScreen>color

enter image description here

first set the required color as lockscreen from the settings>background>lockscreen>color

to know the value of this color run the below command.

gsettings get org.gnome.desktop.screensaver primary-color

Example:

pratap@i7-6550U:~$ gsettings get org.gnome.desktop.screensaver primary-color
'#7a8aa2'
pratap@i7-6550U:~$ 

Copy the color, in above case it is #7a8aa2

now we need to edit the gdm3.css file.

open the file with your favorite editor, mine is gedit. so
sudo -H gedit /etc/alternatives/gdm3.css

go to line number around 1985 & 1986 and find the below content.

#lockDialogGroup {
  background: none;
  background-color: none;
  background-gradient-direction: vertical;
  background-gradient-start: #6D2169;
  background-gradient-end: #370026; }

change the content with

#lockDialogGroup {
  background: none;
  background-color: none;
  background-gradient-direction: vertical;
  background-gradient-start: #7a8aa2;
  background-gradient-end: #7a8aa2; }

here in the line number 1985 & 1986 put the color you want in place of #7a8aa2

save the file, close & reboot to see the change.

enter image description here

enter image description here

these are the 15 colors + default one.

#7a634b
#425265
#475b52
#888888
#7a8aa2
#ff89a9
#ed9116
#d272c4
#437740
#fad166
#ab2876
#5d479d
#008094
#db5d33
#000000

#023c88

Share:
6,840

Related videos on Youtube

Boris Hamanov
Author by

Boris Hamanov

Former DEC Hardware Engineer, DEC Field Service Manager, and DEC VAX/VMS System Manager, but mostly a Computer Hardware Service Manager. Have worked for Digital Equipment Corporation, Computerland, Sony, Computerware, Executron Computers, CompUSA, and Apple Computer. Hardware, software, and management savvy.

Updated on September 18, 2022

Comments

  • Boris Hamanov
    Boris Hamanov over 1 year

    This is almost a dup of this question, but with a slight variation.

    Instead of using a picture file for the login screen background, I'd like to use the same solid color background that I've set for the lock screen in the Background settings panel.

    Where are the lock screen solid color panels located? What mod to the referenced question would I need to make? Could I just place a renamed copy of the solid color panel where the current background file is, so that I don't have to modify the gdm3.css file?

    I'm looking for the easiest way.

  • Boris Hamanov
    Boris Hamanov over 5 years
    Excellent! Same color I choose too! Thanks again. I wish they'd drop that purple theme...
  • Boris Hamanov
    Boris Hamanov over 5 years
    Your/my choice of blue looks a lot more modern than purple :-)
  • Boris Hamanov
    Boris Hamanov over 5 years
    Just a minor tweak for you... instead of sudo gedit you should probably change that to sudo -H gedit, so as you don't accidentally create a login loop. Use sudo -H whenever you start a graphic app from the command line. Cheers!
  • akikara
    akikara over 5 years
    What about changing the date and time appears? @heynnema
  • Boris Hamanov
    Boris Hamanov over 5 years
    @akikara I don't understand your question.
  • akikara
    akikara over 5 years
    In Ubuntu 18.10 based on locale settings date is displayed as Friday, Jan 25. I want to add year to this.
  • Boris Hamanov
    Boris Hamanov almost 5 years
    How to do this in 19.04? #lockDialogGroup is different in /etc/alternatives/gdm3.css, and modifying the background color there doesn't work. If you'd like me to start a new question for this, please let me know :-)
  • UnKNOWn
    UnKNOWn almost 5 years
    no, there is already a asked and accepted question relates with 19.04
  • UnKNOWn
    UnKNOWn almost 5 years
  • UnKNOWn
    UnKNOWn almost 5 years
    please have a look on comments in this post.. askubuntu.com/q/1149123/739431 @heynnema
  • Boris Hamanov
    Boris Hamanov almost 5 years
    @PRATAP thanks for the fast reply. My .css file looks different. I tried to modify the color to #7A8AA2 (maybe I should have left lower case a's? Like #7a8aa2), but when I tried it, it just gave a flashing screen. My .css has #lockDialogGroup { background-color: #2C001E; }.
  • Boris Hamanov
    Boris Hamanov almost 5 years
    @PRATAP Maybe my problem is how I modified the .css file. I had changed #lockDialogGroup { background-color: #2C001E; } to #lockDialogGroup { background-color: #7A8AA2;} ##2C001E; }. Maybe I forgot the trailing ; I wonder if that's it, or if it didn't like that I made the last line a comment (so I knew what to go back to if I needed to...).
  • Boris Hamanov
    Boris Hamanov almost 5 years
    @PRATAP yes... that was it. I had an edit error. It's working now.
  • UnKNOWn
    UnKNOWn almost 5 years
    thank you @heynnema