Good evening,

I'm trying to change some of the colours of my login screen in my Ubuntu 18.04. I followed some questions here on AskUbuntu, and edited my css files at /usr/share/gnome-shell/theme/gnome-shell.css (I'm using that configuration) - Specifically, I changed the values of .lockDialogGroup to a nicer dark gray.

My login screen is indeed now a nice dark gray instead of that hellish purple.

However, if I lock my computer without shutting down the machine, I still get a different purple gradient, which I haven't managed to change. I'm serching around but since I don't even know what to call this "behind-the-shield" screen, I can't find relevant results.

I suspect the login screen and the lock screen are two different managers altogether.

Here's a short mp4 video of me literally filming my screen, to make you understand which color I'm trying to change:


EDIT: There seems to be a discrepancy between my first-after-boot login screen, and my login-after-locking screen.

first Login screen after boot: enter image description here

After-lock login screen: enter image description here

  • @PRATAP Doesn't matter, I'm interested in finding where the .css that controls this gradient is located – Dimitris Sfounis Jan 6 '19 at 13:15
  • Which desktop environment are you using? The default gnome or something else? Please edit the output of printf 'Desktop: %s\nSession: %s\n' "$XDG_CURRENT_DESKTOP" "$GDMSESSION" into your post. as suggested here – Elder Geek Jan 14 '19 at 20:03

Edit the file /usr/share/xsessions/ubuntu-communitheme-snap.desktop and change the "ubuntu-communitheme" text to "myct" (change anything, not necessarily "myct") in the line starting with Exec=

sudo -H gedit /usr/share/xsessions/ubuntu-communitheme-snap.desktop

enter image description here

[Desktop Entry]
Name=Ubuntu with communitheme snap
Comment=This session logs you into Ubuntu
Exec=env GNOME_SHELL_SESSION_MODE=myct /snap/communitheme/current/session

create a file named myct.json in the directory /usr/share/gnome-shell/modes/ with below content.

enter image description here

    "parentMode": "user",
    "stylesheetName": "myct.css",
    "enabledExtensions": ["ubuntu-dock@ubuntu.com", "ubuntu-appindicators@ubuntu.com"]

Create a text file named myct.css in the directory /usr/share/gnome-shell/theme/

sudo touch /usr/share/gnome-shell/theme/myct.css

Open the file and paste the below content

sudo -H gedit /usr/share/gnome-shell/theme/myct.css


@import url("/snap/communitheme/current/share/gnome-shell/theme/Communitheme/gnome-shell.css");

#lockDialogGroup {
  background-color: magenta; }

Reboot and then lock the screen to see your preferred color.

enter image description here

enter image description here

| improve this answer | |

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.