Score:3

How does Ubuntu theme GDM?

us flag

I’ve checked a few things already.

The file /usr/share/gnome-shell/gnome-shell-theme.gresource is stock GNOME.
The directory /etc/gdm3/ contains no mention of “Yaru” or “theme” except for commented out lines, ditto for /usr/share/gdm/.
I’ve also taken a cursory glance at /var/lib/gdm3/greeter-dconf-defaults using strings, and it doesn’t seem to mention themes or Yaru either.

I’m using Ubuntu 22.04 LTS.

I am not asking for how to theme GDM myself with a custom theme. I am specifically asking how Ubuntu currently does it.

kanehekili avatar
zw flag
google "Ubuntu configure GDM" leads to [this](https://manpages.ubuntu.com/manpages/trusty/man8/gdm.8.html). This explains **how** Ubuntu does it. (GDM is just a "program" used by Ubuntu)
schuelermine avatar
us flag
@kanehekili No, that does not explain how Ubuntu themes it. It says it reads a `/etc/gdm/custom.conf`, but that doesn’t actually set the theme—I’ve looked at it.
Score:3
zw flag

Debian often uses "update-alternatives" to replace standard behaviour. Ubuntu does so too.

if you execute

sudo update-alternatives --get-selections | grep gdm

you'll receive:

gdm-theme.gresource   auto  /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource

This implies that the configured gdm.theme.resource is not the original one, but a resource created by the yaru team.

How to find out and how to change?

sudo update-alternatives --config gdm-theme.gresource

will list all available options (and shows which resource is currently used) :

There are 2 choices for the alternative gdm-theme.gresource (providing /usr/share/gnome-shell/gdm-theme.gresource).

  Selection    Path                                                           Priority   Status
---------------------------------------------
* 0            /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource   15        auto mode
  1            /usr/share/gnome-shell/gnome-shell-theme.gresource              10        manual mode
  2            /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource   15        manual mode

Press <enter> to keep the current choice[*], or type selection number: 

In this example yaru has been selected (the star indicates it), selecting "1" would change it to the original Gnome.

So how does Ubuntu (and other Debian derivates) do it?

They'll look into their /etc/alternatives/gdm-theme.gresource directory, where the link will be preserved:

lrwxrwxrwx 1 root root 61 Jan 23  2022 /etc/alternatives/gdm-theme.gresource -> /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource

The linking goes on, check the /usr/share/gnome-shell/gdm-theme.gresource which links to the entry above.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.