I wrote an answer advising the use of sudo -i nautilus
. I know that gksu
is deprecated, and I was under the impression that sudo -i
is how we should run graphical applications as root without killing kittens, but someone commented 'pkexec
is the new gksu
'. My understanding is that pkexec
is not the same as using any form of sudo
:
When to use pkexec vs gksu/gksudo?
and requires setting up, especially to use with graphical applications:
When I do sudo -i
everything always works, so why should I go to the trouble of configuring pkexec
? I can see that for writing a script that launches something as root I would need to do it:
Can I use pkexec in a Python Script or .desktop file?
But otherwise, what do I gain from using pkexec
? When should I use these commands? What is currently the best practice for opening graphical applications as root?
(I already read the... man
pages, but I am feeling no wiser.)
gksu
on every system to run GUI apps withgksudo
if needed. Nothing else.sudo -i
is a safe solution; But not much explained forpkexec
.sudoedit
(AKAsudo -e
)?sudoedit
? Interesting idea