diff --git a/debian/control b/debian/control index 66b1fe0af1..eeee61e09b 100644 --- a/debian/control +++ b/debian/control @@ -89,7 +89,6 @@ Depends: metacity, nemo, network-manager-gnome [linux-any], - policykit-1-gnome, python3, python3-dbus, python3-distro, diff --git a/js/ui/main.js b/js/ui/main.js index b0d23d33ce..a08af7bb8d 100644 --- a/js/ui/main.js +++ b/js/ui/main.js @@ -440,9 +440,7 @@ function start() { _initUserSession(); screenRecorder = new ScreenRecorder.ScreenRecorder(); - if (Meta.is_wayland_compositor()) { - PolkitAuthenticationAgent.init(); - } + PolkitAuthenticationAgent.init(); KeyringPrompt.init(); diff --git a/js/ui/polkitAuthenticationAgent.js b/js/ui/polkitAuthenticationAgent.js index 396c6f96f0..bfbf863c60 100644 --- a/js/ui/polkitAuthenticationAgent.js +++ b/js/ui/polkitAuthenticationAgent.js @@ -38,6 +38,7 @@ const ModalDialog = imports.ui.modalDialog; const CinnamonEntry = imports.ui.cinnamonEntry; const UserWidget = imports.ui.userWidget; const Util = imports.misc.util; +const Main = imports.ui.main; const DIALOG_ICON_SIZE = 64; const DELAYED_RESET_TIMEOUT = 200; @@ -441,5 +442,22 @@ var AuthenticationAgent = class { } function init() { - let agent = new AuthenticationAgent(); + try { + let agent = new AuthenticationAgent(); + } catch(err) { + if(!(err instanceof Error)) { + err = new Error(err); + } + + log('polkitAuthenticationAgent: init error ' + err); + + let icon = new St.Icon({ icon_name: 'dialog-warning', + icon_type: St.IconType.FULLCOLOR, + icon_size: 36 }); + + Main.warningNotify(_('Unable to start Cinnamon PolicyKit Agent'), err.message + + "\n\n" + + _("If you have another PolicyKit Agent configured to autostart, it should be disabled."), + icon); + } }