UshakovVasilii / gnome-shell-extension-freon

Shows CPU temperature, disk temperature, video card temperature (NVIDIA/Catalyst/Bumblebee&NVIDIA), voltage and fan RPM
https://extensions.gnome.org/extension/841/freon
GNU General Public License v2.0
424 stars 77 forks source link

`pkexec` is not a replacement for `sudo`, enabling pkexec option asks for admin password every second #272

Closed illwieckz closed 10 months ago

illwieckz commented 10 months ago

pkexec is not a replacement for sudo

As far as I know, there is no pkexec equivalent to sudo --non-interactive.

What does sudo --non-interactive <program> is that if the user has allow the program to be run with sudo, the program is run, but if the user has not allowed program to be run with sudo, the program is not run. People who don't gave permission for the said program will not get the sensor values, people who gave permission for the said program will get the sensor values.

With pkexec, the admin password is asked every second forever, taking priority over every application and making very hard to open the extension preferences to disable the option.

Not providing the admin password immediately asks for the password again and forever, providing the admin password immediately asks for the password again and forever.

I know GNOME people asked you to replace sudo with pkexec as you said in:

But well, pkexec cannot replace sudo, as already stated in:

Actually the people asking you to replace sudo with pkexec don't know what they talk about. We have a nail and a hammer and they ask you to replace the hammer with a screwdriver. That doesn't work.

illwieckz commented 10 months ago

The known workaround to use pkexec instead of sudo is to do what the cpufreq GNOME Shell extension does:

Actually the cpufreq extension is doing even worse than that because they have more needs and they have to install a script, actually installing and running as root a script that was downloaded from the internet with the extension. LOL.