gdm: Only create the Manager we're going to use
Otherwise gnome-shell crashes when systemd is installed but not in use, because bus activation of logind fails. https://bugzilla.gnome.org/show_bug.cgi?id=672240
This commit is contained in:
parent
ceb17dc713
commit
c7182589d2
@ -33,10 +33,13 @@ const PowerMenuButton = new Lang.Class({
|
||||
|
||||
_init: function() {
|
||||
this.parent('system-shutdown', null);
|
||||
this._consoleKitManager = new ConsoleKit.ConsoleKitManager();
|
||||
this._systemdLoginManager = new Systemd.SystemdLoginManager();
|
||||
this._upClient = new UPowerGlib.Client();
|
||||
|
||||
if (Systemd.haveSystemd())
|
||||
this._systemdLoginManager = new Systemd.SystemdLoginManager();
|
||||
else
|
||||
this._consoleKitManager = new ConsoleKit.ConsoleKitManager();
|
||||
|
||||
this._createSubMenu();
|
||||
|
||||
this._upClient.connect('notify::can-suspend',
|
||||
|
Loading…
Reference in New Issue
Block a user