summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsilvan <silvan@trollbox.org>2022-03-09 11:23:18 +0100
committerRobert Ancell <robert.ancell@gmail.com>2022-06-29 16:57:03 +1200
commit77a7c6b7b8ca896b98ef43826641bdd520650bfb (patch)
tree760b0b2ec841c7c9f2ba29493c0433b048235891
parent35326597c2f5d1e42c56feaf7f8aedac9c9d14ff (diff)
downloadlightdm-git-77a7c6b7b8ca896b98ef43826641bdd520650bfb.tar.gz
config: set `logind-check-graphical=True` per default
Without `logind-check-graphical=True` beeing set, lightdm is prone to a race condition, where lightdm has started before the graphics driver was loaded.
-rw-r--r--data/lightdm.conf2
-rw-r--r--src/lightdm.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/data/lightdm.conf b/data/lightdm.conf
index 16b80f7e..0df38429 100644
--- a/data/lightdm.conf
+++ b/data/lightdm.conf
@@ -26,7 +26,7 @@
#lock-memory=true
#user-authority-in-system-dir=false
#guest-account-script=guest-account
-#logind-check-graphical=false
+#logind-check-graphical=true
#log-directory=/var/log/lightdm
#run-directory=/var/run/lightdm
#cache-directory=/var/cache/lightdm
diff --git a/src/lightdm.c b/src/lightdm.c
index 81b91172..72ac9e7c 100644
--- a/src/lightdm.c
+++ b/src/lightdm.c
@@ -812,6 +812,8 @@ main (int argc, char **argv)
}
if (!config_has_key (config_get_instance (), "XDMCPServer", "hostname"))
config_set_string (config_get_instance (), "XDMCPServer", "hostname", g_get_host_name ());
+ if (!config_has_key (config_get_instance (), "LightDM", "logind-check-graphical"))
+ config_set_string (config_get_instance (), "LightDM", "logind-check-graphical", TRUE);
/* Override defaults */
if (log_dir)