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 682041 - Timeout for entering a password is far too short
Timeout for entering a password is far too short
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: login-screen
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Ray Strode [halfline]
gnome-shell-maint
Depends on:
Blocks: 681143
 
 
Reported: 2012-08-16 19:29 UTC by Giovanni Campagna
Modified: 2012-08-17 02:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ShellIdleMonitor: turn it into a singleton (2.62 KB, patch)
2012-08-16 19:29 UTC, Giovanni Campagna
committed Details | Review
UnlockDialog: go back to the lock screen automatically when idle (1.74 KB, patch)
2012-08-16 19:30 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2012-08-16 19:29:34 UTC
Well, this was the original bug. The reality is that, after fixing bug 682009, the timeout is a bit too long, so we need to have one ourselves.
Comment 1 Giovanni Campagna 2012-08-16 19:29:52 UTC
Created attachment 221452 [details] [review]
ShellIdleMonitor: turn it into a singleton

It doesn't make sense to have multiple ShellIdleMonitors, since
each has its own GDK filter function, but they all get the same
events. In preparation for having it accessed from other places
than the message tray, make it a singleton.
Comment 2 Giovanni Campagna 2012-08-16 19:30:05 UTC
Created attachment 221453 [details] [review]
UnlockDialog: go back to the lock screen automatically when idle

Now that GDM no longer emits auth failures after 25 seconds, we
need to handle inactivity ourselves.
This has also the advantage that it tracks real inactivity, rather
than a timeout from a fixed point in time.
Comment 3 Jasper St. Pierre (not reading bugmail) 2012-08-16 19:39:57 UTC
Review of attachment 221452 [details] [review]:

Sure.

::: src/shell-idle-monitor.c
@@ +326,2 @@
 {
+        static GObject *idle_monitor;

static ShellIdleMonitor *

@@ +329,1 @@
+        if (idle_monitor == NULL)

G_UNLIKELY
Comment 4 Allan Day 2012-08-16 22:52:58 UTC
The timeout should also take user activity into account, so I don't hit a timeout in the middle of entering my password. (Sorry if this is the wrong bug for that...)
Comment 5 Giovanni Campagna 2012-08-16 23:07:42 UTC
No, this is the right bug, and yes, the new timeout implementation does exactly that.
Comment 6 Jasper St. Pierre (not reading bugmail) 2012-08-16 23:26:57 UTC
Review of attachment 221453 [details] [review]:

Minor nits, but sure.

::: js/ui/unlockDialog.js
@@ +21,3 @@
 const GdmUtil = imports.gdm.util;
 
+/* The timeout before going back automatically to the lock screen (in seconds) */

//

@@ +22,3 @@
 
+/* The timeout before going back automatically to the lock screen (in seconds) */
+const IDLE_TIMEOUT = 120;

I like to use expressions like 2 * 60 * 1000. They're a bit more self-documenting.

@@ +173,3 @@
+
+        this._idleMonitor = Shell.IdleMonitor.get();
+        this._idleWatchId = this._idleMonitor.add_watch(IDLE_TIMEOUT * 1000, Lang.bind(this, this._escape));

I'd like a comment describing that there's guaranteed user activity by the time we get here, so that the alarm should always fire after two minutes of user activity.
Comment 7 Giovanni Campagna 2012-08-16 23:34:47 UTC
Attachment 221452 [details] pushed as 6a9b199 - ShellIdleMonitor: turn it into a singleton
Attachment 221453 [details] pushed as 341b6a1 - UnlockDialog: go back to the lock screen automatically when idle
Comment 8 Ray Strode [halfline] 2012-08-17 02:59:15 UTC
should probably use the screensaver lock timeout instead of a hard coded value.