• Ray Strode's avatar
    daemon: kill and restart greeter on demand under wayland · c0188a70
    Ray Strode authored
    Right now we leave the greeter alive after the user logs in.
    This is for two reasons:
    
    1) When the greeter is running Xorg, there's no way to kill
    it when it's running on an inactive VT (X jumps to the foreground
    when being killed)
    
    2) The greeter, in a way, provides a securepath for unlock.
    Users in theory could know that by hitting ctrl-alt-f1 to secure
    attention, the login screen presented is not spoofed.
    
    Since we use wayland by default, 1 isn't that much of a concern,
    and 2 is a bit of niche feature that most users probably haven't
    considered.
    
    And there's a huge downside to keeping the greeter alive: it uses
    a very large amount of memory.
    
    This commit changes GDM to kill the login screen when switching
    away from the login screen's VT and restarting it when switching
    back.
    
    Based heavily on work by Hans de Goede <hdegoede@redhat.com>
    
    Closes: GNOME/gdm#222
    c0188a70
gdm-local-display-factory.c 35.2 KB