summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorIain Lane <iainl@gnome.org>2019-05-07 16:00:14 +0100
committerIain Lane <iain@orangesquash.org.uk>2019-05-29 15:53:35 +0000
commit1c061b84ffc3e874da825982d18d970556ff74bb (patch)
tree64f56c787fdfa6e2a205ea726d589fad546da300 /common
parent9496f639715b1b8e31b2b0a5bd37a8b6761249b3 (diff)
downloadgdm-1c061b84ffc3e874da825982d18d970556ff74bb.tar.gz
Allow sessions to register with GDM
Recording when sessions start, for Wayland → Xorg fallback or transitioning to the user session, is currently done with timeouts. This isn't ideal, because on some very slow machines the timeout can be hit before the session has had a chance to fail: if gnome-session takes more than 3 seconds to fail then the session will be considered to have exited rather than failed, and so we don't do Xorg fallback. We can do this more reliably if we allow sessions to optionally register themselves with GDM. Then we will know when they've started, so can shut down the greeter or fall back to Xorg as appropriate. The mechanism is that they specify X-GDM-SessionRegisters=true in their file, and then call RegsterSession on the DisplayManager interface on the bus (added in the previous commit) to say that they've started up. If X-GDM-SessionRegisters is missing or false, GDM will call the same method for them after 10 seconds. Closes: #483
Diffstat (limited to 'common')
-rw-r--r--common/gdm-common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/gdm-common.h b/common/gdm-common.h
index 07812b10..58814aa2 100644
--- a/common/gdm-common.h
+++ b/common/gdm-common.h
@@ -27,6 +27,8 @@
#include <pwd.h>
#include <errno.h>
+#define REGISTER_SESSION_TIMEOUT 10
+
#define VE_IGNORE_EINTR(expr) \
do { \
errno = 0; \