screenShield: explicitly load gnome-screensaver in fallback mode.

When running gnome-shell from lightDM, gnome-screensaver is no
longer auto-loaded. As a result the dbus calls for Lock user etc
will fail.

https://bugzilla.gnome.org/show_bug.cgi?id=683060
Bug-Ubuntu: https://launchpad.net/bugs/1064354
This commit is contained in:
Tim Lunn 2012-10-19 10:44:28 +11:00 committed by Ray Strode
parent bdeb7d86b6
commit 418cf6281e

View File

@ -21,6 +21,7 @@ const Overview = imports.ui.overview;
const MessageTray = imports.ui.messageTray;
const ShellDBus = imports.ui.shellDBus;
const Tweener = imports.ui.tweener;
const Util = imports.misc.util;
const SCREENSAVER_SCHEMA = 'org.gnome.desktop.screensaver';
const LOCK_ENABLED_KEY = 'lock-enabled';
@ -866,6 +867,8 @@ const ScreenShieldFallback = new Lang.Class({
Name: 'ScreenShieldFallback',
_init: function() {
Util.spawn(['gnome-screensaver']);
this._proxy = new Gio.DBusProxy({ g_connection: Gio.DBus.session,
g_name: 'org.gnome.ScreenSaver',
g_object_path: '/org/gnome/ScreenSaver',