After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 696287 - Need to enter password twice on fast user switch
Need to enter password twice on fast user switch
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: login-screen
3.7.x
Other Linux
: Normal normal
: ---
Assigned To: Ray Strode [halfline]
gnome-shell-maint
3.8.1
Depends on:
Blocks:
 
 
Reported: 2013-03-21 13:30 UTC by Cosimo Cecchi
Modified: 2013-03-26 00:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
loginManager: Listen on correct object path (2.89 KB, patch)
2013-03-25 17:05 UTC, drago01
none Details | Review
loginManager: listen to the correct object path (1.76 KB, patch)
2013-03-25 17:10 UTC, Cosimo Cecchi
needs-work Details | Review
loginManager: listen to the correct object path (5.20 KB, patch)
2013-03-25 17:27 UTC, Cosimo Cecchi
committed Details | Review

Description Cosimo Cecchi 2013-03-21 13:30:55 UTC
Using gnome-shell 3.7.92, to reproduce:

- from a normal user session, select Switch User, and log into another session with a different user
- from the session just created, select switch user again, and choose the previous session
- password prompt is triggered, enter password
- you will be switched to the lock screen of that session, where you will need to enter password again

One password should be enough.
Comment 1 Matthias Clasen 2013-03-22 13:09:35 UTC
Looks like unlocking 'from the outside' broke
Comment 2 Matthias Clasen 2013-03-24 23:36:24 UTC
This is a mismatch between what object path gnome-shell is listening for unlock signals and what object  logind actually puts on the bus.

On my system, I see:

echo $XDG_SESSION_ID 
3

in gnome-shell:

            this._currentSession = new SystemdLoginSession(Gio.DBus.system,
                                                           'org.freedesktop.login1',
                                                           '/org/freedesktop/login1/session/' +
                                                           GLib.getenv('XDG_SESSION_ID'));


but

$ gdbus call --system --dest org.freedesktop.login1 --object-path /org/freedesktop/login1 --method org.freedesktop.login1.Manager.GetSessionByPID 22167
(objectpath '/org/freedesktop/login1/session/_33',)
Comment 3 Matthias Clasen 2013-03-24 23:50:49 UTC
Instead of using $XDG_SESSION_ID, we either need to call GetSessionByPID or use sd_pid_get_session()
Comment 4 drago01 2013-03-25 17:05:52 UTC
Created attachment 239791 [details] [review]
loginManager: Listen on correct object path

We need to call GetSessionByPID() instead of using
$XDG_SESSION_ID for the session id.


---

Note: Untested.
Comment 5 Cosimo Cecchi 2013-03-25 17:10:58 UTC
Created attachment 239794 [details] [review]
loginManager: listen to the correct object path

Use GetSession() to get the valid object path for the current XDG_SESSION_ID.

--

Alternate simpler version; I tested it and it seems to work fine.
Comment 6 drago01 2013-03-25 17:18:51 UTC
Review of attachment 239794 [details] [review]:

We should do this async as discussed on IRC.
Comment 7 Cosimo Cecchi 2013-03-25 17:27:47 UTC
Created attachment 239801 [details] [review]
loginManager: listen to the correct object path

--

Now avoiding sync code paths.
Comment 8 Giovanni Campagna 2013-03-25 17:38:57 UTC
Review of attachment 239801 [details] [review]:

This one should do.

(Tested, works fine)
Comment 9 Matthias Clasen 2013-03-26 00:31:46 UTC
We should leave this for 3.8.1, I guess
Comment 10 Cosimo Cecchi 2013-03-26 00:55:52 UTC
Attachment 239801 [details] pushed as 869e1dc - loginManager: listen to the correct object path

Got second approval from r-t.