I installed a customized css file for the GDM of Ubuntu 18.04 via 2 approaches. Surprisingly, they gave different results:
Approach (A)
- I saved my customized GDM css file as
/usr/share/gnome-shell/theme/ubuntu.css
. That is, I had replaced the original ubuntu.css file with my own .css file, but gave the new file the same name as ubuntu.css. - I pressed Alt+F2 followed by r+ Return to restart the GDM.
- Next, I pressed Super+L to lock my desktop. From there, I was first able to see the wallpaper setup by gnome-tweaks for the lockscreen. The widget styles of the lockscreen adhered to my customized css file. Next, for the unlockscreen, its wallpaper and widget styles followed my customized css file.
- To see the result of my customized css file on the loginscreen, I had to restart the system or logout from my current session.
Approach (B)
1 I used these commands:
$ sudo update-alternatives --auto gdm3.css
$ sudo update-alternatives --install /usr/share/gnome-shell/theme/gdm3.css gdm3.css /usr/share/gnome-shell/theme/mytheme/mytheme.css 11
update-alternatives: using /usr/share/gnome-shell/theme/mytheme/mytheme.css to provide /usr/share/gnome-shell/theme/gdm3.css (gdm3.css) in auto mode
$ sudo update-alternatives --config gdm3.css
There are 2 choices for the alternative gdm3.css (providing /usr/share/gnome-shell/theme/gdm3.css).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/share/gnome-shell/theme/mytheme/mytheme.css 11 auto mode
1 /usr/share/gnome-shell/theme/mytheme/mytheme.css 11 manual mode
2 /usr/share/gnome-shell/theme/ubuntu.css 10 manual mode
Press <enter> to keep the current choice[*], or type selection number:
- I pressed Alt+F2 followed by r+ Return to restart the GDM.
- Next, I pressed Super+L to lock my desktop. Unlike Approach A, I was unable to see the wallpaper and styles defined in my customized css file in the unlockscreen; it was a purple screen with the usual ubuntu unlock widgets appeared. For the lockscreen (i.e. screensaver), it showed the wallpaper setup by gnome-tweaks but it's widget style did not follow my customized css file.
- To see if the effect of my customised css file would appear in the loginscreen, I restarted the system. I was glad to find the wallpaper and styles defined in my customised ccs appearing in the loginscreen. However, after logging in, and after pressing Super+L to lock my desktop, the issues described in 3. still persisted.
Can you explain to me why Approach B and Approach A yielded different end products? In particular, why did the style and wallpapers defined in my customized css file not appear in the unlockscreen and the widget styles defined in my customized css file not appear in lockscreen for Approach B?