This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goserver. commit 65990298c99aca393f33cdbe47d528277d3fe25d Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Sat Sep 28 21:15:03 2019 +0200 GNOME sessions: Avoid firing up of a polkit-1 authentication dialog requesting admin credentials to register a new color map device. See GNOME bug: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/issues/273 --- debian/changelog | 7 +++++++ debian/x2goserver.install | 2 ++ x2goserver.spec | 9 +++++++++ x2goserver/Makefile | 6 ++++++ .../10-vendor.d/x2goserver-no-colord.pkla | 10 ++++++++++ .../etc/polkit-1/rules.d/10-x2goserver-no-colord.rules | 17 +++++++++++++++++ 6 files changed, 51 insertions(+) diff --git a/debian/changelog b/debian/changelog index 86692f5e..018166c5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -12,6 +12,13 @@ x2goserver (4.1.0.4-0x2go1.2) UNRELEASED; urgency=medium option. (Fixes: #1395). - x2goruncommand: Support GNOME-based Ubuntu sessions (via X2Go Kdrive) as provided by Ubuntu 18.04 or later. + - GNOME sessions: Avoid firing up of a polkit-1 authentication dialog + requesting admin credentials to register a new color map device. + See GNOME bug: + https://gitlab.gnome.org/GNOME/gnome-settings-daemon/issues/273 + This change only gets activated for Debian for now and focuses + on policykit-1 (<= 0.105). (Debian maintainers of policykit-1 + are holding back newer versions for unknown reason). * debian/x2goserver.postinst: + Drop duplicate sourcing of debconf includes. + Add Dutch debconf translation. Thanks to Frans Spiesschaert. diff --git a/debian/x2goserver.install b/debian/x2goserver.install index c76a876b..e1524cce 100644 --- a/debian/x2goserver.install +++ b/debian/x2goserver.install @@ -1,4 +1,6 @@ etc/logcheck/ignore.d.server/x2goserver +x2goserver/etc/polkit-1/localauthority/10-vendor.d/x2goserver-no-colord.pkla etc/polkit-1/localauthority/10-vendor.d/ +#x2goserver/etc/polkit-1/rules.d/x2goserver-no-colord.rules etc/polkit-1/rules.d/ etc/sudoers.d/x2goserver etc/x2go/x2go_logout* usr/bin/x2gobasepath diff --git a/x2goserver.spec b/x2goserver.spec index 5fd1adfc..a52c1ac1 100644 --- a/x2goserver.spec +++ b/x2goserver.spec @@ -159,6 +159,11 @@ Requires: x2goserver-xsession Suggests: x2goserver-fmbindings Suggests: x2goserver-printing %endif +#Requires: polkit-pkla-compat (or polkit <= 0.105) +# -> /etc/polkit-1/localauthority/10-vendor.d/x2goserver-no-colord.pkla +#or +#Requires: polkit (>= 0.106) +# -> /etc/polkit-1/rules.d/x2goserver-no-colord.rules %{?perl_default_filter} @@ -896,6 +901,10 @@ fi %if ( ! 0%{?suse_version} ) || 0%{?suse_version} >= 1210 %config(noreplace) %{_sysconfdir}/sudoers.d/x2goserver %endif +### polkit (<= 0.105) +#%config(noreplace) %{_sysconfdir}/polkit-1/localauthority/10-vendor.d/x2goserver-no-colord.pkla +## polkit (>= 0.106) +#%config(noreplace) %{_sysconfdir}/polkit-1/rules.d/x2goserver-no-colord.rules %{_bindir}/x2go* %exclude %{_bindir}/x2goserver-run-extensions %exclude %{_bindir}/x2gofm diff --git a/x2goserver/Makefile b/x2goserver/Makefile index 746e83ea..9a53a015 100755 --- a/x2goserver/Makefile +++ b/x2goserver/Makefile @@ -142,6 +142,12 @@ install_config: $(INSTALL_FILE) etc/sudoers.d/x2goserver $(DESTDIR)/etc/sudoers.d/ $(INSTALL_DIR) $(DESTDIR)/etc/logcheck/ignore.d.server || true $(INSTALL_FILE) etc/logcheck/ignore.d.server/x2goserver $(DESTDIR)/etc/logcheck/ignore.d.server/ + # keep this commented out, until x2goserver.spec knows how to + # handle pkla/rules file installation for what RPM distro / version + #$(INSTALL_DIR) $(DESTDIR)/etc/polkit-1/localauthority/10-vendor.d/ || true + #$(INSTALL_FILE) etc/polkit-1/localauthority/10-vendor.d/x2goserver-no-colord.pkla $(DESTDIR)/etc/polkit-1/localauthority/10-vendor.d/ + #$(INSTALL_DIR) $(DESTDIR)/etc/polkit-1/rules.d/ || true + #$(INSTALL_FILE) etc/polkit-1/rules.d/x2goserver-no-colord.rules $(DESTDIR)/etc/polkit-1/rules.d/ install_man: $(INSTALL_DIR) $(DESTDIR)$(MANDIR) diff --git a/x2goserver/etc/polkit-1/localauthority/10-vendor.d/x2goserver-no-colord.pkla b/x2goserver/etc/polkit-1/localauthority/10-vendor.d/x2goserver-no-colord.pkla new file mode 100644 index 00000000..b8824b0b --- /dev/null +++ b/x2goserver/etc/polkit-1/localauthority/10-vendor.d/x2goserver-no-colord.pkla @@ -0,0 +1,10 @@ +# GNOME sessions in X2Go Server will try to create a color-manager +# map device on session startup. Let's disable colord support on +# this host entirely as a workaround. +# +# See: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/issues/273 + +[Allow all users to manage color devices] +Identity=unix-user:* +Action=org.freedesktop.color-manager.* +ResultAny=no diff --git a/x2goserver/etc/polkit-1/rules.d/10-x2goserver-no-colord.rules b/x2goserver/etc/polkit-1/rules.d/10-x2goserver-no-colord.rules new file mode 100644 index 00000000..054f0735 --- /dev/null +++ b/x2goserver/etc/polkit-1/rules.d/10-x2goserver-no-colord.rules @@ -0,0 +1,17 @@ +# GNOME sessions in X2Go Server will try to create a color-manager +# map device on session startup. Let's disable colord support on +# this host entirely as a workaround. +# +# See: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/issues/273 + +polkit.addRule(function(action, subject) { + if (action.id == "org.freedesktop.color-manager.create-device" || + action.id == "org.freedesktop.color-manager.create-profile" || + action.id == "org.freedesktop.color-manager.delete-device" || + action.id == "org.freedesktop.color-manager.delete-profile" || + action.id == "org.freedesktop.color-manager.modify-device" || + action.id == "org.freedesktop.color-manager.modify-profile") + { + return polkit.Result.NO; + } +}); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goserver.git