Written by jouva the 29 Feb 08 at 07:25.
Category: System.
Related project:
Nothing/Others.
Status: New
Rationale
I've found myself several times needing to manually edit a file in /etc for a package that has no front end, or otherwise needing to edit a root-owned file. It would be very nice to allow for gedit to prompt for administrative password, or have the ability to see that a file is not owned by you and allow one to choose to edit as an admin, thus gksudo'ing it.
if you open a terminal and type in 'sudo gedit', I think you'll be happy to find that you can browse and open files using gedit as a privileged user. Perhaps if we could right click on an app however and say open as administrator and then have it prompt for password.
I voted this down as it shouldn't be necessary specifically for gedit. But it might be useful to have a more general way to run programs as root from the GUI.
Things like nautilus-gksu are nasty hacks because they mean the whole application (in this case, Gedit) runs as root, which Policykit is powerful and flexible enough to avoid.
The most sensible implementation (for Gedit) will be that you open a text file (which you don't have write permissions for) in Nautilus with an unprivileged Gedit, make some changes to it, hit save and then Gedit will give you a Policykit authentication box to allow it to gain the privileges necessary to save the file. This means that the application runs as a normal user and only gains privileges where necessary.
For those who don't know, Policykit is a tool that asks for the password when needed. For instance, Synaptic uses it. If you run Synaptic, you wouldn't need to run gksudo syaptic, because Policykit knows when the password is needed. I hope this will be integrated in both nautilus and gedit.