mate-desktop / mate-applets

Applets for use with the MATE panel
http://www.mate-desktop.org
GNU General Public License v2.0
79 stars 67 forks source link

cpufreq-selector - privileges #646

Closed markd89 closed 1 year ago

markd89 commented 1 year ago

Hi,

I'd like to be able to set the CPU to conservative or performance without needing to enter my password. I was hacking on this a few weeks ago and didn't find a solution. Can someone point me to what works for them? I am using Mate 1.26 in Debian Bookworm (testing)

Thank you!

lukefromdc commented 1 year ago

This may vary with the distro, as the cpufreq-selector can be either installed with the SUID bit set, or can be controlled by polkit, details to follow:

lukefromdc commented 1 year ago

When polkit is in use creating this file should do it: /var/lib/polkit-1/localauthority/50-local.d/org.mate.cpufreqselector.pkla with the oontents below, for users with sudo authority and w/o having the enter your passphrase.

[org.mate.cpufreqselector]
Identity=unix-group:adm
Action=org.mate.cpufreqselector
ResultAny=no
ResultInactive=no
ResultActive=yes

I did this so long ago I have forgotten the details of how it works but this is what I have

markd89 commented 1 year ago

Much thanks, I used this with Identity=unix-group:users

and it works nicely