Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it so that greeter login unlocks automatically? #53

Closed
alercah opened this issue Nov 4, 2018 · 6 comments
Closed

Make it so that greeter login unlocks automatically? #53

alercah opened this issue Nov 4, 2018 · 6 comments

Comments

@alercah
Copy link

alercah commented Nov 4, 2018

Some lockers automatically unlock when the greeter is used to log back into the same session. Is there a way to make xsecurelock do this as well?

@divVerent
Copy link
Contributor

For now I have implemented SIGTERM handling; what is left is seeing what it takes to integrate with xss-lock or something else so we get told about the unlock event,

@divVerent
Copy link
Contributor

XSecureLock should now properly respond to this code path of xss-lock:

static void
logind_session_on_signal_lock(GDBusProxy *proxy,                                 
                              gchar      *sender_name,                           
                              gchar      *signal_name,                           
                              GVariant   *parameters,                            
                              gpointer    user_data)                             
{                                                                                
    if (!g_strcmp0(signal_name, "Lock"))                                         
        start_child(&locker);                                                    
    else if (!g_strcmp0(signal_name, "Unlock"))                                  
        kill_child(&locker);                                                     
}                                                                                

I can trigger it like this:

loginctl lock-session; sleep 10; loginctl unlock-session

However, trying to log in from the greeter does not trigger this. Odd.

@divVerent
Copy link
Contributor

xautolock has:

    if (unlockNow && !disabled)
    {
      (void) kill (lockerPid, SIGTERM);
    }

which is triggered by xautolock -unlocknow, without any other way for the greeter to do this.

@divVerent
Copy link
Contributor

Lightdm runs:

        if (session->priv->login1_session_id)
            login1_service_unlock_session (login1_service_get_instance (), session->priv->login1_session_id);
        else if (session->priv->console_kit_cookie)
            ck_unlock_session (session->priv->console_kit_cookie);

This uses the org.freedesktop.login1 dbus service, and if that fails, the org.freedesktop.ConsoleKit service. xss-lock also listens to org.freedesktop.login1... so shouldn't this work? Why not?

@divVerent
Copy link
Contributor

This is weird, as it now works for me - but only when xss-lock got started later manually, not when it came with my session. Weird. Maybe the initial connection to logind just failed?

@divVerent
Copy link
Contributor

Also working for me on another system, using xss-lock as well. Closing as not reproducible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants