diff --git a/js/gdm/powerMenu.js b/js/gdm/powerMenu.js index 59ebc42e6..32edccda4 100644 --- a/js/gdm/powerMenu.js +++ b/js/gdm/powerMenu.js @@ -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',