From: "David Wilson" <david@daviwil.com>
To: 37764@debbugs.gnu.org
Subject: [bug#37764] [PATCH] services: xfce: Add xfce4-power-manager to polkit settings.
Date: Tue, 15 Oct 2019 05:17:54 -0700 [thread overview]
Message-ID: <8465d5c7-af94-4e51-8874-8eab11492f5b@www.fastmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 687 bytes --]
Hi all!
This patch fixes an issue in the XFCE desktop service configuration which causes the polkit action for xfce4-power-manager to not be installed in /etc/polkit-1/actions. The lack of this file causes the user to be prompted for administrator credentials when they attempt to use their laptop's screen brightness keys.
The fix is to use a similar pattern to the GNOME service and add an 'xfce-polkit-settings' procedure which generates the list of XFCE packages that contain polkit actions to install. Now that this list contains 'xfce4-power-manager`, the polkit file 'org.xfce.power.policy' is installed correctly and the screen brightness keys work as intended.
Thanks!
David
[-- Attachment #1.2: Type: text/html, Size: 1163 bytes --]
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-services-xfce-Add-xfce4-power-manager-to-polkit-sett.patch --]
[-- Type: text/x-patch; name="0001-services-xfce-Add-xfce4-power-manager-to-polkit-sett.patch", Size: 2015 bytes --]
From ab45872546d34b6968d52829e58a3007b898c287 Mon Sep 17 00:00:00 2001
From: David Wilson <david@daviwil.com>
Date: Mon, 14 Oct 2019 20:54:13 -0700
Subject: [PATCH] services: xfce: Add xfce4-power-manager to polkit settings.
* gnu/services/desktop.scm (xfce-desktop-service-type): Add
xfce4-power-manager to polkit-service-type service extension via
new procedure 'xfce-polkit-settings'.
---
gnu/services/desktop.scm | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index a32756e040..5a7f8be4bb 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -9,6 +9,7 @@
;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2017, 2019 Christopher Baines <mail@cbaines.net>
;;; Copyright © 2019 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
+;;; Copyright © 2019 David Wilson <david@daviwil.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -907,15 +908,21 @@ and extends polkit with the actions from @code{mate-settings-daemon}."
xfce-desktop-configuration
(xfce xfce-package (default xfce)))
+(define (xfce-polkit-settings config)
+ "Return the list of XFCE dependencies that provide polkit actions and
+rules."
+ (let ((xfce (xfce-package config)))
+ (map (lambda (name)
+ ((package-direct-input-selector name) xfce))
+ '("thunar"
+ "xfce4-power-manager"))))
+
(define xfce-desktop-service-type
(service-type
(name 'xfce-desktop)
(extensions
(list (service-extension polkit-service-type
- (compose list
- (package-direct-input-selector
- "thunar")
- xfce-package))
+ xfce-polkit-settings)
(service-extension profile-service-type
(compose list xfce-package))))
(default-value (xfce-desktop-configuration))
--
2.23.0
next reply other threads:[~2019-10-15 12:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-15 12:17 David Wilson [this message]
2019-10-20 10:08 ` bug#37764: [PATCH] services: xfce: Add xfce4-power-manager to polkit settings Danny Milosavljevic
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=8465d5c7-af94-4e51-8874-8eab11492f5b@www.fastmail.com \
--to=david@daviwil.com \
--cc=37764@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.