• Iain Lane's avatar
    Allow sessions to register with GDM · 1c061b84
    Iain Lane authored
    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