jsalatas / plasma-pstate

Intel P-state and CPUFreq Manager Widget
GNU General Public License v2.0
274 stars 49 forks source link

Manjaro and sudoers group, let's discuss a solution #4

Closed Mrcuve0 closed 5 years ago

Mrcuve0 commented 5 years ago

HI! First of all I'd like to thank you for this widget, nice idea and nice realization!

So, a little background I think here is needed. I'm on Manjaro KDE and the plasmoid didn't work correctly: please take a look at this screenshot.

So I started checking your script file, enabling and disabling TLP hoping for conflicts, I even tried to run it on a KDE Neon VirtualBox install (although I solved the problem before the installation completion) but nothing happened.

Finally, I checked if my user was correctly added to the sudoers group and I learnt that Arch based distros use the wheel group as a sudoers group, as pointed here.

So, as pointed by the forum, I checked into the /etc/sudoers.d/ folder and changed the content of the file 99-plasma-pstate and changed it from

%sudo ALL=NOPASSWD: /usr/share/plasma/plasmoids/gr.ictpro.jsalatas.plasma.pstate/contents/code/set_prefs.sh

to

%wheel ALL=NOPASSWD: /usr/share/plasma/plasmoids/gr.ictpro.jsalatas.plasma.pstate/contents/code/set_prefs.sh

Now the plasmoid works correclty.

Actually, I don't know if just adding this new line to the 99-plasma-pstate will solve the problem or if there's a more elegant solution: for example we could also check if the user runs on manjaro or arch and then decide what to do.

jsalatas commented 5 years ago

Thanks for your feedack!

The changes I just committed should handle the issue.