From patchwork Tue Oct 15 12:17:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: David Wilson X-Patchwork-Id: 15746 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 4B9501759D; Tue, 15 Oct 2019 13:20:26 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,HTML_MESSAGE, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id EB0D617561 for ; Tue, 15 Oct 2019 13:20:25 +0100 (BST) Received: from localhost ([::1]:43186 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKLoP-0000lg-Gf for patchwork@mira.cbaines.net; Tue, 15 Oct 2019 08:20:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37560) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKLo3-0000hj-6A for guix-patches@gnu.org; Tue, 15 Oct 2019 08:20:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iKLo1-0003YP-WA for guix-patches@gnu.org; Tue, 15 Oct 2019 08:20:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34037) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iKLo1-0003YL-St for guix-patches@gnu.org; Tue, 15 Oct 2019 08:20:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iKLo1-0001uJ-MK for guix-patches@gnu.org; Tue, 15 Oct 2019 08:20:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#37764] [PATCH] services: xfce: Add xfce4-power-manager to polkit settings. Resent-From: "David Wilson" Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 15 Oct 2019 12:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 37764 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 37764@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15711419477244 (code B ref -1); Tue, 15 Oct 2019 12:20:01 +0000 Received: (at submit) by debbugs.gnu.org; 15 Oct 2019 12:19:07 +0000 Received: from localhost ([127.0.0.1]:42856 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iKLn4-0001se-Oz for submit@debbugs.gnu.org; Tue, 15 Oct 2019 08:19:06 -0400 Received: from lists.gnu.org ([209.51.188.17]:34152) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iKLn1-0001sF-M8 for submit@debbugs.gnu.org; Tue, 15 Oct 2019 08:19:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37476) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iKLmz-0008L5-Ch for guix-patches@gnu.org; Tue, 15 Oct 2019 08:18:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iKLmy-0003Jz-26 for guix-patches@gnu.org; Tue, 15 Oct 2019 08:18:57 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:47149) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iKLmx-0003JW-LP for guix-patches@gnu.org; Tue, 15 Oct 2019 08:18:56 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id AF30A21DC7 for ; Tue, 15 Oct 2019 08:18:53 -0400 (EDT) Received: from imap2 ([10.202.2.52]) by compute2.internal (MEProxy); Tue, 15 Oct 2019 08:18:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daviwil.com; h= mime-version:message-id:date:from:to:subject:content-type; s= fm3; bh=ONERMPlzg9/d0siZcXrhKiW+L3RDZJHMBIOK8aH5scI=; b=WGuv77tQ +V23D4BXwGIss4RbrgtkHxoEL6uaU9lFrPH3XxxKfeu1IepBhJvRsPFjReoTZD7n cdvvBRXSU8qIyKNQq4Em0LjpkfeYNzCqejTOQ/bhcjrPi5PAQyVwMkcR2qC8CLyk smzXLVoHsWVN4eyIBjGhu9dwSPmnAj1ywVujAdw2THGnQN5URnOu3U7FNtoSeGK3 VuzrJcXcZQpHUZuyAMSgOPqKGfxohvnbV+HOdtiEFOkDyY7t/0UE4Fxy1qg9Ll8r IHl3Wr2jF7lwd4rPtPnmoREwjaGBHq2vNJJSTNoDxp6+G7yo3QNV+0X3tO1BHR3h dm42EdLYsHSkGw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=ONERMPlzg9/d0siZcXrhKiW+L3RDZ JHMBIOK8aH5scI=; b=jIljxHU3LScdR3qXe6VvOolwM3hV7rkTwY2/YPyzrORoS Gda031cIQSTeodA10fbHZNQyt0x7nyv5BJlJVVgTZ6qKVMhk7J2LQImuIsUZIJJJ 0Qlolzyqi956Uy+PLjjBqYhSNzIiS3snkCqjJHbncwC1YYxZ8jLr3SjPERSZos9m 7f8Fiw5bTmK7uubwdD56I1WFjBnXWlg4ysYj349RtguZ9JAsqItVtVGneN2oG+Y1 oqy2MphsjVx0svdXTEQMshgspzDZFbx8V6oTDHFFn0HcrHV0ZxCRyUr00guko7H9 2REgQikGWm+LxWvlTGK9mV/UsEyUjkFWhOemcOq7A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrjeefgdehtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkfffhvffutgesmhdtreerre ertdenucfhrhhomhepfdffrghvihguucghihhlshhonhdfuceouggrvhhiugesuggrvhhi fihilhdrtghomheqnecurfgrrhgrmhepmhgrihhlfhhrohhmpegurghvihgusegurghvih ifihhlrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id 423A2E00A5; Tue, 15 Oct 2019 08:18:53 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.1.7-360-g7dda896-fmstable-20191004v2 Mime-Version: 1.0 Message-Id: <8465d5c7-af94-4e51-8874-8eab11492f5b@www.fastmail.com> Date: Tue, 15 Oct 2019 05:17:54 -0700 From: "David Wilson" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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 From ab45872546d34b6968d52829e58a3007b898c287 Mon Sep 17 00:00:00 2001 From: David Wilson 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 ;;; Copyright © 2017, 2019 Christopher Baines ;;; Copyright © 2019 Tim Gesthuizen +;;; Copyright © 2019 David Wilson ;;; ;;; 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