(address . bug-guix@gnu.org)
Related to: https://issues.guix.gnu.org/22952
On a mate desktop (mate-desktop-service-type).
FN-F9, FN-F10 (binded to ‘decrease brightness’ and ‘increase brightness’):
Toggle quote (2 lines)
> Authentication is needed to run '/gnu/store/mp33h4vqdw0scdkjj0v6c3gima9wz8lm-mate-power-manager-1.24.2/sbin/mate-power-backlight-helper' as the super user.
Contents of /etc/polkit-1/actions/org.mate.power.policy:
[...]
<icon_name>battery</icon_name>
<action id="org.mate.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">/gnu/store/zk4kb4437032swahywmgyzn55b5w5wj8-mate-power-manager-1.24.2/sbin/mate-power-backlight-help>
</action>
[...]
FWIW, the following works as expected (no error message), using the store path in .policy:
$ pkexec /gnu/store/zk4kb4437032swahywmgyzn55b5w5wj8-mate-power-manager-1.24.2/sbin/mate-power-backlight-helper --set-brightness=300
Maybe MATE is trying the equivalent of "pkexec /wrong/store/path/mate-power-backlight-helper --etcetera" instead
of referring to the action by name org.mate.power.backlight-helper.
Note the store path is different. Now try something different
$ which mate-power-backlight-helper
Toggle quote (1 lines)
> /run/current-system/profile/sbin/mate-power-backlight-helper
$ ls -l /run/current-system/profile/sbin/mate-power-backlight-helper
Toggle quote (2 lines)
> /gnu/store/ffqhy4xdpzkg06rlq76zrbwn8v3rqgw9-mate-1.24.1/sbin/mate-power-backlight-helper
Now we have three different store paths so far!
Not sure what the proper way to resolve this, and what causes the three different store paths,
but one way to resolve this would be referring to /run/current-system/profile/sbin/mate-power-backlight-helper
in org.mate.power.policy (untested!).
It looks like there could very well be be similar issues in (unverified):
* /etc/polkit-1/actions/org.gnome.controlcenter.remote-login-helper.policy
* /etc/polkit-1/actions/org.gnome.gnome-system-monitor.policy
* /etc/polkit-1/actions/org.gnome.settings-daemon.plugins.power.policy
* /etc/polkit-1/actions/org.gnome.settings-daemon.plugins.wacom.policy
* grep for /gnu/store/ in /etc/polkit-1/actions/*.policy
Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----
iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYJRQixccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7tQ5AP9f0eQ7QbmZyyYbxsWTg3nG+aWP
FyDRRJgD1g0lHotoWQEAk9VioOFO+RCktwrY+qSWh5sva9etg4CMVSGlNGArewk=
=z1Gt
-----END PGP SIGNATURE-----