I’m gonna keep this one super brief.
Here’s the deal: ‘gksu’ (the once recommended way to run GUI apps as root) was deprecated in favour of ‘pkexec’, a graphical fronted for PolicyKit, several years back. Ubuntu no longer ships with gksu installed.
For all its benefits there’s a big ol’ “problem” with pkexec: it’s a total butt-ache to use to run certain GUI apps as root. In fact, to use pkexec with applications like Gedit or Nautilus you need to have a requisite PolicyKit file installed in your “/usr/share/polkit-1/actions” directory for each app you’re trying to run as root.
Neither Ubuntu or GNOME ship with PolicyKit files for Gedit or Nautilus by default.
“But I use sudo?”
Now if you’re like me you probably already run both apps as root using ‘sudo gedit’ and ‘sudo nautilus’.
We’re not not supposed to this, mind. Instead we’re told to manually add a policy file to PolicyKit. But let’s be honest: that’s a lot more effort, right? Punching “sudo gedit” into the green and black is far simpler.
Well, soon you won’t have to worry about effort. Thanks to the awesome work of GNOME developer Cosimo Cecchi, Policy files for both apps will ship in GNOME 3.22. If Ubuntu 17.04 uses Nautilus and Gedit 3.22, the issue of using Nautilus and Gedit with pkexec will be solved.
Root Gedit will be a simple
Thanks to anon