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
Subject: [bug#47870] [PATCH 1/2] gnu: polkit-gnome: Add autostart .desktop file.
Date: Sun, 18 Apr 2021 23:17:26 +1000	[thread overview]
Message-ID: <20210418131727.6104-1-mail@brendan.scot> (raw)
In-Reply-To: <35342344.77101.1618751631600@office.mailbox.org>

* gnu/packages/polkit.scm (polkit-gnome):
[inputs]: Source a translated .desktop file from Arch Linux.
[arguments]: Install the .desktop file into /etc/autostart and set
OnlyShowIn to XFCE so it will be autostarted only by XFCE.
[description]: Add a note clarifying that this package is currently only
used for XFCE, not GNOME.
---
 gnu/packages/polkit.scm | 39 +++++++++++++++++++++++++++++++++++----
 1 file changed, 35 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/polkit.scm b/gnu/packages/polkit.scm
index d868aceec2..1c5173921c 100644
--- a/gnu/packages/polkit.scm
+++ b/gnu/packages/polkit.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2017 Huang Ying <huang.ying.caritas@gmail.com>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2021 Brendan Tildesley <mail@brendan.scot>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -183,12 +184,42 @@ easily with PolicyKit.")
                 "0sckmcbxyj6sbrnfc5p5lnw27ccghsid6v6wxq09mgxqcd4lk10p"))))
     (build-system gnu-build-system)
     (inputs `(("gtk+" ,gtk+)
-              ("polkit" ,polkit)))
+              ("polkit" ,polkit)
+              ("desktop-file"
+               ,(origin
+                  (method url-fetch)
+                  (uri
+                   (string-append
+                    "https://raw.githubusercontent.com/archlinux/svntogit-community/"
+                    "8963650797cfe0383ef510e9c0492b2cb22a2593/repos/community-x86_64/"
+                    "polkit-gnome-authentication-agent-1.desktop"))
+                  (sha256
+                   (base32
+                    "1rqy8jf01idaqnyrzjaapr7pzx8zg2x9kmw70n1p9cpalhiwfx2h"))))))
     (native-inputs `(("intltool"   ,intltool)
                      ("pkg-config" ,pkg-config)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'install-autostart-file
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (autostart-dir (string-append out "/etc/xdg/autostart"))
+                    (desktop (string-append
+                              autostart-dir
+                              "/polkit-gnome-authentication-agent-1.desktop")))
+               (mkdir-p autostart-dir)
+               (copy-file (assoc-ref inputs "desktop-file") desktop)
+               (substitute* desktop
+                 (("^Exec=.*")
+                  (string-append
+                   "Exec=" out "/libexec/polkit-gnome-authentication-agent-1\n"))
+                 ;; This will mean the agent will only be started in XFCE.
+                 (("^OnlyShowIn=.*") "OnlyShowIn=XFCE;\n"))))))))
     (synopsis "Legacy polkit authentication agent for GNOME")
-    (description "PolicyKit-gnome provides a D-Bus session bus service
-that is used to bring up authentication dialogs used for obtaining
-privileges.")
+    (description "PolicyKit-gnome provides a D-Bus session bus service that
+is used to bring up authentication dialogs used for obtaining privileges.
+PolicyKit-gnome is no longer used in GNOME but has become the default agent
+for XFCE.")
     (home-page "https://www.freedesktop.org/wiki/Software/polkit/")
     (license lgpl2.0+)))
-- 
2.31.1





  reply	other threads:[~2021-04-18 13:18 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 ` Brendan Tildesley [this message]
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
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=20210418131727.6104-1-mail@brendan.scot \
    --to=mail@brendan.scot \
    --cc=47870@debbugs.gnu.org \
    /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.