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 582587 - Screen can't be locked immediately after session startup
Screen can't be locked immediately after session startup
Status: RESOLVED OBSOLETE
Product: gnome-settings-daemon
Classification: Core
Component: general
2.26.x
Other All
: Normal minor
: ---
Assigned To: gnome-settings-daemon-maint
gnome-settings-daemon-maint
Depends on:
Blocks:
 
 
Reported: 2009-05-14 10:05 UTC by Fortunato Ventre
Modified: 2010-06-09 14:33 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
Add a new gconf key used to customize the gnome-screensaver startup delay. (2.67 KB, patch)
2009-05-14 10:07 UTC, Fortunato Ventre
rejected Details | Review

Description Fortunato Ventre 2009-05-14 10:05:38 UTC
Please describe the problem:
I've always used to enable the autologin feature in gdm, in conjunction with the 'gnome-screensaver-command --lock' command in 'Startup Applications' in order to lock the screen immediately after login. This way I was ready to work just inserting my user's password.

A recent change in gnome-settings-daemon adds a 30 seconds delay for starting gnome-screensaver, at session startup. The reason is (directly from the source code comments):
 /*
  * We'll start the screensaver after a delay so it doesn't
  * compete with other processes while the session is starting
  */

This makes impossible to immediately lock the screen.

Steps to reproduce:
1. Add the 'gnome-screensaver-command --lock' command to 'Startup Applications'.
2. Restart desktop session.


Actual results:
Screen is not locked because gnome-screensaver is not started yet.

Expected results:
Screen immediately locked at session startup.

Does this happen every time?
Yes.

Other information:
I've written a little patch that adds a new gconf key used to set the startup delay for gnome-screensaver. It defaults to 30 seconds. Setting it to 0 will result in gnome-screensaver immediately started, and screen lockable.
Comment 1 Fortunato Ventre 2009-05-14 10:07:29 UTC
Created attachment 134637 [details] [review]
Add a new gconf key used to customize the gnome-screensaver startup delay.
Comment 2 Jens Granseuer 2009-05-14 17:05:21 UTC
Hm. Even assuming that really is a problem (is it?), making the delay configurable doesn't solve anything. If the screensaver really needs to be available immediately after session startup that means we need some kind of signal or something, not an arbitrary delay that may or may start it at the right time, or too early, or too late, anyway.

(NB: I'd need to check but I believe there already is such a signal. However, auto-started apps are probably started before that signal is sent. Adding an autostart auto-lock seems pretty non-sensical to me in any case.)
Comment 3 William Jon McCann 2009-05-14 17:11:44 UTC
Another option is to make the screensaver dbus activated so that it always starts when someone tries to lock the screen.
Comment 4 Ray Strode [halfline] 2009-05-14 17:14:55 UTC
it makes a lot of sense to autologin and then autolock the screen.  This was discussed a few guadecs ago.

See: 

http://mail.gnome.org/archives/screensaver-list/2007-July/msg00006.html

For a follow up thread on that.

Note sure we should be starting screensaver from settings-daemon at all though.  Maybe we should start it from gnome-session in the application phase if normal login and activate it earlier in the initialization phase if auto logging in.
Comment 5 Jens Granseuer 2009-07-13 09:44:04 UTC
Screensaver is gone from gsd now (bug 585485).