all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Brendan Tildesley <mail@brendan.scot>
To: 47870@debbugs.gnu.org
Cc: Leo Prikler <leo.prikler@student.tugraz.at>
Subject: [bug#47870] [PATCH 1/2] gnu: polkit-gnome: Add autostart .desktop file.
Date: Mon, 19 Apr 2021 08:56:54 +0200 (CEST)	[thread overview]
Message-ID: <1897089617.84042.1618815414259@office.mailbox.org> (raw)
In-Reply-To: <f1e47d74bd425ffe396681c14f37a0245405b826.camel@student.tugraz.at>

[-- Attachment #1: Type: text/plain, Size: 1075 bytes --]


> On 04/18/2021 5:52 PM Leo Prikler <leo.prikler@student.tugraz.at> wrote:
> 
>  
> Hi,
> 
> Am Sonntag, den 18.04.2021, 17:15 +0200 schrieb Brendan Tildesley:
> > > On 04/18/2021 4:47 PM Leo Prikler <leo.prikler@student.tugraz.at>
> > > wrote:
[...]
> > On second thought perhaps another option is just to use the MATE
> > polkit
> > agent instead? I tested it for changing network manager and it worked
> > just the same, only the GUI looks slightly different. I was searching
> >  What do you think?
> If it works for XFCE, why not?  Given that polkit-gnome has no
> dependents other than itself, should we perhaps also look into removing
> it?
> 
One issue is that mate-polkit's .desktop file has the line OnlyShowIn=MATE;
This prevents it from being launched in any other desktop. When multiple 
desktops are installed all these files sit in /run/current-desktop/profile/etc/
and rely these lines to make them not appear in other desktops.

I made a couple patches [attached] that adds XFCE to the the .desktop's OnlyShowIn.
It's a little ugly though. 
> Regards,
> Leo

[-- Attachment #2: 0002-gnu-xfce-Start-mate-polkit-agent-on-login.patch --]
[-- Type: text/x-patch, Size: 1317 bytes --]

From 835d0748ca4c0738d777aed8f895622759ea4f8d Mon Sep 17 00:00:00 2001
From: Brendan Tildesley <mail@brendan.scot>
Date: Mon, 19 Apr 2021 16:45:15 +1000
Subject: [PATCH 2/2] gnu: xfce: Start mate-polkit agent on login.

* gnu/packages/xfce.scm (xfce): Add mate-polkit to the xfce union
package. This will cause the authentication agent to be run on login.
This fixes users in XFCE not being able to edit NetworkManager settings.
---
 gnu/packages/xfce.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scm
index 38240d7b9f..786a8cf243 100644
--- a/gnu/packages/xfce.scm
+++ b/gnu/packages/xfce.scm
@@ -48,6 +48,7 @@
   #:use-module (gnu packages inkscape)
   #:use-module (gnu packages libcanberra)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages mate)
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages pdf)
   #:use-module (gnu packages photo)
@@ -971,6 +972,7 @@ on your desktop.")
        ("gnome-icon-theme"     ,gnome-icon-theme)
        ("gtk-xfce-engine"      ,gtk-xfce-engine)
        ("hicolor-icon-theme"   ,hicolor-icon-theme)
+       ("mate-polkit"          ,mate-polkit)
        ("ristretto"            ,ristretto)
        ("shared-mime-info"     ,shared-mime-info)
        ("thunar"               ,thunar)
-- 
2.31.1


[-- Attachment #3: 0001-gnu-polkit-mate-Enable-autostarting-in-XFCE.patch --]
[-- Type: text/x-patch, Size: 1949 bytes --]

From ef20e6422cea8089a4ecf2e7b0293c27bc71a56b Mon Sep 17 00:00:00 2001
From: Brendan Tildesley <mail@brendan.scot>
Date: Mon, 19 Apr 2021 16:37:55 +1000
Subject: [PATCH 1/2] gnu: polkit-mate: Enable autostarting in XFCE.

* gnu/packages/mate.scm (polkit-mate): Add XFCE to the OnlyShowIn field
of the autostart .desktop file so it will be started by XFCE too. This
is for the same of making polkit-mate the de facto agent for XFCE in
Guix, since XFCE does not have it's own official one.

One downside of this is that since all these .desktop files end up in
/run/current-system/profile/etc/, if a user for some reasons wants to have
MATE installed, plus an XFCE that doesn't include mate-polkit, this cause
XFCE to start it anyway. Not sure if that is a big deal.
---
 gnu/packages/mate.scm | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/gnu/packages/mate.scm b/gnu/packages/mate.scm
index 44420147a3..1a8a268cc9 100644
--- a/gnu/packages/mate.scm
+++ b/gnu/packages/mate.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2019 Guy Fleury Iteriteka <hoonandon@gmail.com>
 ;;; Copyright © 2020 Jonathan Brielmaier <jonathan.brielmaier@web.de>
 ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
+;;; Copyright © 2021 Brendan Tildesley <mail@brendan.scot>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1511,6 +1512,14 @@ MATE Desktop to monitor your system resources and usage.")
        ("gtk+" ,gtk+)
        ("gdk-pixbuf" ,gdk-pixbuf)
        ("polkit" ,polkit)))
+    ;; This will allow mate-polkit to be used with XFCE too.
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-desktop-for-xfce
+           (lambda _
+             (substitute* "src/polkit-mate-authentication-agent-1.desktop.in.in"
+                 (("MATE;") "MATE;XFCE;")))))))
     (home-page "https://mate-desktop.org/")
     (synopsis "DBus specific service for MATE")
     (description
-- 
2.31.1


  reply	other threads:[~2021-04-19  6:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-18 13:13 [bug#47870] [PATCH 0/2] Autostart polkit-gnome in XFCE Brendan Tildesley via Guix-patches via
2021-04-18 13:17 ` [bug#47870] [PATCH 1/2] gnu: polkit-gnome: Add autostart .desktop file Brendan Tildesley
2021-04-18 13:17   ` [bug#47870] [PATCH 2/2] gnu: xfce: Start polkit-gnome agent on login Brendan Tildesley
2021-04-18 14:47   ` [bug#47870] [PATCH 1/2] gnu: polkit-gnome: Add autostart .desktop file Leo Prikler
2021-04-18 15:15     ` Brendan Tildesley
2021-04-18 15:52       ` Leo Prikler
2021-04-19  6:56         ` Brendan Tildesley [this message]
2021-04-19  7:36           ` Leo Prikler
2021-04-19 11:02             ` Brendan Tildesley
2021-04-19 11:12               ` Leo Prikler
2021-04-19 11:26                 ` Brendan Tildesley
2021-04-19 12:01                   ` Leo Prikler
2021-04-19 13:30                     ` Brendan Tildesley
2021-04-19 13:47                       ` Leo Prikler
2021-04-21  5:31                         ` Brendan Tildesley
2021-04-21  8:44                           ` bug#47870: " Leo Prikler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1897089617.84042.1618815414259@office.mailbox.org \
    --to=mail@brendan.scot \
    --cc=47870@debbugs.gnu.org \
    --cc=leo.prikler@student.tugraz.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.