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 13:02:02 +0200 (CEST) [thread overview]
Message-ID: <563816062.89942.1618830123011@office.mailbox.org> (raw)
In-Reply-To: <758fbca893846a643f5478972867e01d620b89dc.camel@student.tugraz.at>
[-- Attachment #1: Type: text/plain, Size: 2808 bytes --]
> On 04/19/2021 9:36 AM Leo Prikler <leo.prikler@student.tugraz.at> wrote:
>
>
> Hi Brendan,
>
> Am Montag, den 19.04.2021, 08:56 +0200 schrieb Brendan Tildesley:
> > > 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.
> This may potentially be bikeshedding, but what about defining a
> (potentially hidden) package, that inherits from mate-polkit (call it
> mate-polkit-for-xfce) and installs a .desktop file, that replaces MATE
> with XFCE? Ah, well, you'd also have to move the desktop file to a
> different location for there not to be a name clash.
>
I think it's good to think about. This way makes it more self contained.
> Other than that, the contents of your patches LGTM, but the ChangeLog
> is on a pretty verbose end. For instance, the message for 0001 should
> likely be rewritten as:
>
> ----
> gnu: polkit-mate: Enable autostarting in XFCE.
>
> Add XFCE to the OnlyShowIn field of the autostart .desktop file so it
> will be started by XFCE as well. This is for the same of making
> polkit-mate the de facto polkit agent for XFCE in Guix, since XFCE does
> not ship its own.
>
> A potential downside might be, that this desktop file ends up in the
> current system profile and can therefore be seen in XFCE
> configurations, that did not ask for it.
>
> * gnu/packages/mate.scm (polkit-mate)[#:phases]: Add 'patch-desktop-
> for-xfce'.
> ----
>
> You could also write significantly shorter commit messages, since
> "Enable autostarting in XFCE" already tells you everything the patch
> does.
>
> Regards, Leo
Yeah I suck at commit messages. I've attached new patches doing it this way
and confirmed it worked in a VM.
[-- Attachment #2: 0001-gnu-Add-xfce-mate-polkit-autostart.patch --]
[-- Type: text/x-patch, Size: 2787 bytes --]
From 9eab32585fb16b41f2158ad21b43a032ca3c914d Mon Sep 17 00:00:00 2001
From: Brendan Tildesley <mail@brendan.scot>
Date: Mon, 19 Apr 2021 18:26:31 +1000
Subject: [PATCH 1/2] gnu: Add xfce-mate-polkit-autostart.
gnu/packages/xfce.scm (xfce-mate-polkit-autostart) New symbol.
---
gnu/packages/xfce.scm | 45 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scm
index 38240d7b9f..c7ba6218f1 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)
@@ -948,6 +949,50 @@ menubar and the window decorations are hidden) that helps you to save space
on your desktop.")
(license gpl2+)))
+(define-public xfce-mate-polkit-autostart
+ (package
+ (name "xfce-mate-polkit-autostart")
+ (version "1")
+ (inputs `(("mate-polkit" ,mate-polkit)))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (delete 'unpack)
+ (delete 'bootstrap)
+ (delete 'patch-usr-bin-file)
+ (delete 'patch-source-shebangs)
+ (delete 'configure)
+ (delete 'patch-generated-file-shebangs)
+ (delete 'check)
+ (delete 'install)
+ (delete 'patch-shebangs)
+ (delete 'strip)
+ (delete 'validate-runpath)
+ (delete 'validate-documentation-location)
+ (delete 'delete-info-dir-file)
+ (delete 'patch-dot-desktop-files)
+ (delete 'install-license-files)
+ (delete 'reset-gzip-timestamps)
+ (delete 'compress-documentation)
+ (replace 'build
+ (lambda _
+ (let* ((mate-polkit (assoc-ref %build-inputs "mate-polkit"))
+ (out (assoc-ref %outputs "out"))
+ (dir (string-append out "/etc/xdg/autostart"))
+ (desktop (string-append
+ dir "/xfce4-polkit-mate-authentication-agent-1.desktop")))
+ (mkdir-p dir)
+ (copy-file (string-append
+ mate-polkit "/etc/xdg/autostart/"
+ "polkit-mate-authentication-agent-1.desktop")
+ desktop)
+ (substitute* desktop
+ (("^X-MATE.*") "")
+ (("MATE") "XFCE"))))))))
+ (source #f) (home-page #f) (synopsis #f) (description #f) (license #f)
+ (properties `((hidden? . #t)))))
+
(define-public xfce
(package
(name "xfce")
--
2.31.1
[-- Attachment #3: 0002-gnu-xfce-Add-xfce-mate-polkit-autostart-to-inputs.patch --]
[-- Type: text/x-patch, Size: 928 bytes --]
From d18093a93f34f7d134a6f97e58aa4abaadbe33a6 Mon Sep 17 00:00:00 2001
From: Brendan Tildesley <mail@brendan.scot>
Date: Mon, 19 Apr 2021 20:16:05 +1000
Subject: [PATCH 2/2] gnu: xfce: Add xfce-mate-polkit-autostart to inputs.
* gnu/packages/xfce.scm (xfce):[inputs]: Add xfce-mate-polkit-autostart.
---
gnu/packages/xfce.scm | 1 +
1 file changed, 1 insertion(+)
diff --git a/gnu/packages/xfce.scm b/gnu/packages/xfce.scm
index c7ba6218f1..974259306e 100644
--- a/gnu/packages/xfce.scm
+++ b/gnu/packages/xfce.scm
@@ -1016,6 +1016,7 @@ on your desktop.")
("gnome-icon-theme" ,gnome-icon-theme)
("gtk-xfce-engine" ,gtk-xfce-engine)
("hicolor-icon-theme" ,hicolor-icon-theme)
+ ("xfce-mate-polkit-autostart" ,xfce-mate-polkit-autostart)
("ristretto" ,ristretto)
("shared-mime-info" ,shared-mime-info)
("thunar" ,thunar)
--
2.31.1
next prev parent reply other threads:[~2021-04-19 11:10 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
2021-04-19 7:36 ` Leo Prikler
2021-04-19 11:02 ` Brendan Tildesley [this message]
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=563816062.89942.1618830123011@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.