GNOME Bugzilla – Bug 693403
GNOME Shell fails to start if GNOME Screensaver is not installed
Last modified: 2013-03-06 17:00:24 UTC
When I launch GNOME with startx from command line, or using a graphical desktop manager other than GDM, GNOME Shell fails to run. Installing GNOME Screensaver solves the problem. Expected result: GNOME Shell runs without GNOME Screensaver, so the screen locking functionality will be not available, but everything else functional. Current result: GNOME Shell crashes, and fails to start. Package versions: - gnome-shell 3.6.2 - gnome-screensaver.6.1 Log: ** Message: applet now removed from the notification area JS LOG: error: Execution of 'gnome-screensaver' failed:: Command not found JS ERROR: !!! Exception was: TypeError: messageTray is null JS ERROR: !!! message = '"messageTray is null"' JS ERROR: !!! fileName = '"/usr/share/gnome-shell/js/ui/main.js"' JS ERROR: !!! lineNumber = '434' JS ERROR: !!! stack = '"notify("Execution of 'gnome-screensaver' failed:","Command not found")@/usr/share/gnome-shell/js/ui/main.js:434 notifyError("Execution of 'gnome-screensaver' failed:","Command not found")@/usr/share/gnome-shell/js/ui/main.js:454 _handleSpawnError("gnome-screensaver",[object _private_GLib_SpawnError])@/usr/share/gnome-shell/js/misc/util.js:134 spawn([object Array])@/usr/share/gnome-shell/js/misc/util.js:58 ()@/usr/share/gnome-shell/js/ui/screenShield.js:890 wrapper()@/usr/share/gjs-1.0/lang.js:204 ()@/usr/share/gjs-1.0/lang.js:145 ()@/usr/share/gjs-1.0/lang.js:239 start()@/usr/share/gnome-shell/js/ui/main.js:143 @<main>:1 "' Window manager warning: Log level 32: Execution of main.js threw exception: TypeError: messageTray is null
With fallback mode gone, we can no longer expect gnome-screensaver to be around, so we should probably just drop that fallback locking implementation.
(In reply to comment #1) > we should probably just drop that > fallback locking implementation. That will cause some controversy as it means screen locking will not be available when using a display manager other than gdm, but having a single fallback (e.g. hide the lock action in that case) is more compelling than a fallback fallback, so I'd second that.
Created attachment 238030 [details] [review] loginManager: Move UnlockDialog.isSupported() here With fallback mode dropped, we can no longer rely on gnome-screensaver to be installed, so we'll have cases where we are unable to lock the screen. The user menu should not show the "Lock" item in this case, but as UnlockDialog includes UserMenu, we cannot use the existing check without creating a circular dependency; move the function to a more generic place to fix.
Created attachment 238031 [details] [review] screenShield: Drop fallback implementation With fallback mode gone, we can no longer rely on gnome-screensaver being installed. Rather than handling three different cases (GDM, gnome-screensaver, no lock), disable the lock functionality when not running under GDM.
Review of attachment 238030 [details] [review]: OK.
Review of attachment 238030 [details] [review]: Or, wait, I wonder if we should just require a newer gdm.
No, this is a runtime check. Nowadays we don't need it less to catch pre-3.6 versions of gdm and more to detect sessions not started by gdm (startx, lightdm, ...)
(In reply to comment #7) > [...] Nowadays we don't need it less [...] Should read: we *need* it less
Review of attachment 238031 [details] [review]: Makes sense.
Attachment 238030 [details] pushed as 9a83662 - loginManager: Move UnlockDialog.isSupported() here Attachment 238031 [details] pushed as 3b1e536 - screenShield: Drop fallback implementation