Unix & Linux
gnome gnome-shell screen-lock dconf appearance
Updated Fri, 24 Jun 2022 05:12:44 GMT

How do I customize Gnome screen shield / curtain / login screen appearance?


Gnome desktop seems configurable in various ways: in "Gnome settings", with gnome-extensions, gnome-tweak-tool, gsettings or dconf-editor.

However, apart from this procedure to change the login screen background, which involves a little bit of glib compiling, I have found no way to customize the appearance of:

  • the login screen (font, position, color and size of the login boxes)
  • shield screen aka lock screen aka curtain (font, position, color, format and size of the clock, displayed messages, etc.)

I understand that Gnome philosophy is not to allocate much resource in tweaky-tweak-tweaking-tweakable stuffs. But I am suprised that such basic and harmless properties of these screens seem so difficult to access.

Is there a way I can access and tweak login / shield screen organization properties?
Are they hardcoded or is it just a matter of sneaking into a small curtain.xml or loginscreen.json?
Do I need to get into the sources and compile gnome myself?




Solution

Ubuntu

I use ubuntu 18.04, (also done this in 17.10) and as of how @cezanee-vahid said, you can find the CSS file here: /usr/share/gnome-shell/theme/gdm3.css and by changing this file you don't need to restart gnome or do anything else, they will be changed by locking computer (or better to say will be reloaded).

so for changing clock size you only need to change font-size and font-weight for .screen-shield-clock-time class.

also for if you want to get ride off that arrows in the bottom of the screen just set 0 for height and width of .screen-shield-arrows Gjs_Arrow CSS selector. setting 0 for font-size of .screen-shield-clock-date will do the same for Date.

Arch

I'm not an Arch or even Arch-based distro user, but after reading ArchWiki about GDM it seems like you need to compile source files for GDM after changing them. also, the gdm3.css file in Arch is named gnome-shell.css

so in conclusion, these spets are needed to change GDM theme in Arch:

  1. extracting the current GDM theme
  2. creating a gnome-shell-theme.gresource.xml file for the selected image files
  3. changing gnome-shell.css file as you wish!
  4. compiling the new GDM theme you have created
  5. replacing files under /usr/share/gnome-shell
  6. restating gdm.service

the ArhcWiki above have explained these steps detailed.





Comments (5)

  • +0 – Thank you for these precisions. Unfortunately, I can find no gdm3.css file on my system (this is archlinux speaking). The closest I have found are two files at /usr/share/gnome-shell/theme/{gnome-classic.css,gnome-classic-high-contrast.css}, which do contain the properties you suggest. However, any change I make to these files seem to have no effect even after I restart my computer :\ Can I ask you where you have found these informations? Is there any official documentation about these files? — Mar 21, 2019 at 06:49  
  • +1 – @iago-lito i have updated the answer and think that it should work, I'm looking forward to your reply! and also for ubuntu i just found these things by playing around with gdm3.css file. — Mar 23, 2019 at 23:22  
  • +1 – Great! The compilation was the step I've missed. Cheers :) — Mar 24, 2019 at 08:09  
  • +1 – As suggested there, just type rt in the <Alt+F2> dialog box to restart the theme instead of restarting the whole gdm.service.. it's easier and it doesn't require superuser permissions :) — Mar 24, 2019 at 08:32  
  • +0 – that's great! thank you for feedback :) — Mar 24, 2019 at 20:32