How To Run Gedit And Nautilus As Root With pkexec Instead Of gksu
Author: Andrew | Date: March 18, 2015 | View Comments | Tags: customization, gedit, gnome shell, nautilus, pkexec, ubuntu, unity
gksu hasn't been updated since 2009 and is not recommended any more. In fact, Ubuntu no longer ships with gksu by default (though it may be installed for many of you, because some apps still depend on it) and it may even be completely removed at some point.
The recommended replacement for gksu is pkexec. Applications like Synaptic, Ubuntu Software Center, Software & Updates and others use it for some time but what if you want to use pkexec with applications like Gedit or Nautilus?
By default, you can't because pkexec can't run graphical applications without having a PolicyKit file installed in /usr/share/polkit-1/actions/ for the app you're trying to run as root, and Ubuntu doesn't ship with PolicyKit files for Nautilus or Gedit.
By default, you can't because pkexec can't run graphical applications without having a PolicyKit file installed in /usr/share/polkit-1/actions/ for the app you're trying to run as root, and Ubuntu doesn't ship with PolicyKit files for Nautilus or Gedit.
pkexec authentication dialog under Unity