diff options
author | Richard Hughes <richard@hughsie.com> | 2011-08-03 11:55:44 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2011-08-04 17:56:06 +0100 |
commit | 6bf9c04f17ccc1985b8b68efa8d6e69b98e1fc7b (patch) | |
tree | db60a391ceebcee5e0e5040d30cc13cfe3281085 /plugins/power/org.gnome.settings-daemon.plugins.power.policy.in.in | |
parent | 787db76c809c3bb090c7dca9bbacca09660c3861 (diff) | |
download | gnome-settings-daemon-6bf9c04f17ccc1985b8b68efa8d6e69b98e1fc7b.tar.gz |
power: Add a backlight helper, as xbacklight isn't always present
This helper uses PolicyKit to do a one-time-authentication, which is not
required by default on an active session. This only works on Linux.
The PolicyKit helper has been moved from the gnome-power-manager project, and
was security reviewed by Vincent Untz.
Diffstat (limited to 'plugins/power/org.gnome.settings-daemon.plugins.power.policy.in.in')
-rw-r--r-- | plugins/power/org.gnome.settings-daemon.plugins.power.policy.in.in | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/plugins/power/org.gnome.settings-daemon.plugins.power.policy.in.in b/plugins/power/org.gnome.settings-daemon.plugins.power.policy.in.in new file mode 100644 index 00000000..5adbc419 --- /dev/null +++ b/plugins/power/org.gnome.settings-daemon.plugins.power.policy.in.in @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE policyconfig PUBLIC + "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" + "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd"> +<policyconfig> + + <!-- + Policy definitions for gnome-settings-daemon system-wide actions. + Copyright (c) 2010-2011 Richard Hughes <richard@hughsie.com> + --> + + <vendor>GNOME Settings Daemon</vendor> + <vendor_url>http://git.gnome.org/browse/gnome-settings-daemon</vendor_url> + <icon_name>battery</icon_name> + + <action id="org.gnome.settings-daemon.plugins.power.backlight-helper"> + <!-- SECURITY: + - A normal active user on the local machine does not need permission + to change the backlight brightness. + --> + <_description>Modify the laptop brightness</_description> + <_message>Authentication is required to modify the laptop brightness</_message> + <defaults> + <allow_any>no</allow_any> + <allow_inactive>no</allow_inactive> + <allow_active>yes</allow_active> + </defaults> + <annotate key="org.freedesktop.policykit.exec.path">@libexecdir@/gsd-backlight-helper</annotate> + </action> + +</policyconfig> + |