[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#47870] [PATCH 1/2] gnu: polkit-gnome: Add autostart .desktop file.
From: |
Brendan Tildesley |
Subject: |
[bug#47870] [PATCH 1/2] gnu: polkit-gnome: Add autostart .desktop file. |
Date: |
Sun, 18 Apr 2021 23:17:26 +1000 |
* 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
- [bug#47870] [PATCH 0/2] Autostart polkit-gnome in XFCE, Brendan Tildesley, 2021/04/18
- [bug#47870] [PATCH 1/2] gnu: polkit-gnome: Add autostart .desktop file.,
Brendan Tildesley <=
- [bug#47870] [PATCH 2/2] gnu: xfce: Start polkit-gnome agent on login., Brendan Tildesley, 2021/04/18
- [bug#47870] [PATCH 1/2] gnu: polkit-gnome: Add autostart .desktop file., Leo Prikler, 2021/04/18
- [bug#47870] [PATCH 1/2] gnu: polkit-gnome: Add autostart .desktop file., Brendan Tildesley, 2021/04/18
- [bug#47870] [PATCH 1/2] gnu: polkit-gnome: Add autostart .desktop file., Leo Prikler, 2021/04/18
- [bug#47870] [PATCH 1/2] gnu: polkit-gnome: Add autostart .desktop file., Brendan Tildesley, 2021/04/19
- [bug#47870] [PATCH 1/2] gnu: polkit-gnome: Add autostart .desktop file., Leo Prikler, 2021/04/19
- [bug#47870] [PATCH 1/2] gnu: polkit-gnome: Add autostart .desktop file., Brendan Tildesley, 2021/04/19
- [bug#47870] [PATCH 1/2] gnu: polkit-gnome: Add autostart .desktop file., Leo Prikler, 2021/04/19
- [bug#47870] [PATCH 1/2] gnu: polkit-gnome: Add autostart .desktop file., Brendan Tildesley, 2021/04/19
- [bug#47870] [PATCH 1/2] gnu: polkit-gnome: Add autostart .desktop file., Leo Prikler, 2021/04/19