[displaymanager] lightdm: default to no-preferred-greeter

While here, drop nonsensical alternatives: if it's not a
.desktop file, it's not going to work anyway.
This commit is contained in:
Adriaan de Groot 2023-02-23 20:36:00 +01:00
parent 59fd4ee082
commit 92a208104b

View File

@ -544,8 +544,10 @@ class DMlightdm(DisplayManager):
name = "lightdm" name = "lightdm"
executable = "lightdm" executable = "lightdm"
# Can be overridden in the .conf file # Can be overridden in the .conf file. With no value it won't match any
preferred_greeters = ["lightdm-greeter.desktop"] # desktop file in the xgreeters directory and instead we end up picking
# the alphabetically first file there.
preferred_greeters = []
def set_autologin(self, username, do_autologin, default_desktop_environment): def set_autologin(self, username, do_autologin, default_desktop_environment):
# Systems with LightDM as Desktop Manager # Systems with LightDM as Desktop Manager
@ -654,9 +656,6 @@ class DMlightdm(DisplayManager):
if desktop_names: if desktop_names:
return desktop_names[0] return desktop_names[0]
desktop_names = [n for n in available_names if n.endswith(".desktop")] # .. otherwise any .desktop desktop_names = [n for n in available_names if n.endswith(".desktop")] # .. otherwise any .desktop
if desktop_names:
return desktop_names[0]
desktop_names = [n for n in available_names if not n.startswith(".")] # .. otherwise any non-dot-file
if desktop_names: if desktop_names:
return desktop_names[0] return desktop_names[0]
return None return None