From 3d629c91cfa98b75c6685c2a2003e64fd1b612c4 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 15 Feb 2014 14:55:09 +0000 Subject: intel: Add a helper for setting backlight without root rights Once the xserver stops running as root on kms capabable systems, we will need some other way to access the backlight. The approach taken in this patch moves most of the heavy lifting to a helper that runs with root privileges and pipes our requested brightness into the sysfs backlight interface. Where required, we use pkexec to launch the helper with the elevated privilege. v2: Amalgamate much more of the duplicate code. Keep the daemon and pipe alive for the lifetime of the backlight interface. Provide an alternative for systems without PolicyKit. Signed-off-by: Hans de Goede [v1] Signed-off-by: Chris Wilson --- .../org.x.xf86-video-intel.backlight-helper.policy.in | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tools/org.x.xf86-video-intel.backlight-helper.policy.in (limited to 'tools/org.x.xf86-video-intel.backlight-helper.policy.in') diff --git a/tools/org.x.xf86-video-intel.backlight-helper.policy.in b/tools/org.x.xf86-video-intel.backlight-helper.policy.in new file mode 100644 index 00000000..37e96226 --- /dev/null +++ b/tools/org.x.xf86-video-intel.backlight-helper.policy.in @@ -0,0 +1,19 @@ + + + + The X.Org project + https://01.org/linuxgraphics/community/xf86-video-intel + brightness + + Modify lcd panel brightness + Authentication is required to modify the lcd panel brightness + + no + no + yes + + @prefix@/libexec/xf86-video-intel-backlight-helper + + -- cgit v1.2.3