How to determine which lightdm greeter is in use?

Solution 1:

From a couple of quick tests, it seems the only way is to ask LightDM itself:

$ lightdm --show-config |& awk -F= '/greeter-session=/{print $2}'
kylin-greeter

I started testing with default Ubuntu, then installed lightdm-gtk-greeter and the installed kylin-greeter. In each case, it returned the correct option. For example, after editing /etc/lightdm/lightdm.conf to add greeter-session=unity, the output changed:

$ lightdm --show-config |& awk -F= '/greeter-session=/{print $2}'
unity

$ lightdm --show-config
   [LightDM]
A  backup-logs=false

   [Seat:*]
B  greeter-wrapper=/usr/lib/lightdm/lightdm-greeter-session
C  guest-wrapper=/usr/lib/lightdm/lightdm-guest-session
D  user-session=ubuntu
I  greeter-session=unity
F  xserver-command=X -core
I  autologin-guest=false
I  autologin-user=muru
I  autologin-user-timeout=0

Sources:
A  /usr/share/lightdm/lightdm.conf.d/50-disable-log-backup.conf
B  /usr/share/lightdm/lightdm.conf.d/50-greeter-wrapper.conf
C  /usr/share/lightdm/lightdm.conf.d/50-guest-wrapper.conf
D  /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
E  /usr/share/lightdm/lightdm.conf.d/50-unity-greeter.conf
F  /usr/share/lightdm/lightdm.conf.d/50-xserver-command.conf
G  /usr/share/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf
H  /usr/share/lightdm/lightdm.conf.d/95-kylin-greeter.conf
I  /etc/lightdm/lightdm.conf

Note the source of the configuration.