Closed udaemon closed 4 years ago
Is your sudo
passwordless, or did you remember to make an exception for these commands in /etc/sudoers
? I would guess if you look at htop
you would see sudo cpupower-gui
pending there waiting for you to enter password...
thanks, maximbaz, that could be the right hint: while i have put a sudoers exception for cpupower I haven't for cpupower-gui... will try when I'm back home from travelling.
to provide a final report on my question: it took me a while to understand that this is rather a polkit-issue, i. e. to grant certain permissions on another level than within the terminal-root-realm. and with the help of this comment I was able to solve my issue resp. answer my question.
i had the same situation, i followed the same comment but did "on-click": "pkexec cpupower-gui"
instead of "on-click": "sudo cpupower-gui"
. in case anyone reads this thread in the future
Hi, I was not able to figure out how to run a command as root when a module is clicked. to be precise, I want to start cpupower-gui when I click the icon of the cpu module, but neither
"on-click": "sudo cpupower-gui"
nor"on-click": "swaymsg exec sudo cpupower-gui"
work. I shall mention that I even need to add the option -E or -EH to sudo:"on-click": "swaymsg exec sudo -EH cpupower-gui"
.cpupower-gui needs to be granted root privileges in order to apply any changes.
any hint is very welcome. thank you!