From 92a208104bf1da2d96aa82696f8643dee6d4b498 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 23 Feb 2023 20:36:00 +0100 Subject: [PATCH] [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. --- src/modules/displaymanager/main.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/modules/displaymanager/main.py b/src/modules/displaymanager/main.py index 8c1a44e1c..b403a382a 100644 --- a/src/modules/displaymanager/main.py +++ b/src/modules/displaymanager/main.py @@ -544,8 +544,10 @@ class DMlightdm(DisplayManager): name = "lightdm" executable = "lightdm" - # Can be overridden in the .conf file - preferred_greeters = ["lightdm-greeter.desktop"] + # Can be overridden in the .conf file. With no value it won't match any + # 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): # Systems with LightDM as Desktop Manager @@ -654,9 +656,6 @@ class DMlightdm(DisplayManager): if desktop_names: return desktop_names[0] 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: return desktop_names[0] return None