From 1c061b84ffc3e874da825982d18d970556ff74bb Mon Sep 17 00:00:00 2001 From: Iain Lane Date: Tue, 7 May 2019 16:00:14 +0100 Subject: Allow sessions to register with GDM MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- common/gdm-common.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'common') 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 #include +#define REGISTER_SESSION_TIMEOUT 10 + #define VE_IGNORE_EINTR(expr) \ do { \ errno = 0; \ -- cgit v1.2.1