GNOME Bugzilla – Bug 582587
Screen can't be locked immediately after session startup
Last modified: 2010-06-09 14:33:08 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.
Created attachment 134637 [details] [review] Add a new gconf key used to customize the gnome-screensaver startup delay.
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.)
Another option is to make the screensaver dbus activated so that it always starts when someone tries to lock the screen.
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.
Screensaver is gone from gsd now (bug 585485).