Written by SoftwareExplorer the 22 Oct 08 at 02:14.
Related project: Gnome.
Status: New
Rationale
If I open a file that is only able to be changed by root, make changes and then realize that I didn't start gedit with sudo, I have to copy the whole document and then save save it as root by reopening gedit. It is good to make you operating system secure, but it isn't a good idea to make security cumbersome. Then people just turn off the security.
Modded up. There are many suggestions on this site about how to run GUI programs as root when they should not be, but this idea is a real world example of a user _not_ running as root and only opening that possibility when he needs it.
Behind the scenes, this could work by gedit saving as a tmp file, then "sudo echo < /tmp/file-from-gedit > file-to-save-as". I would even suggest rewriting the original file to a backup file just in case.
I do not think it should be possible in any case. If you do not realize you need root to edit whatever you're editing, you shouldn't _be_ editing it.
andruk(Idea reviewer)
wrote on the 22 Oct 08 at 22:27
This would be nice, and evidently would work with PolicyKit.
If I may add some tongue-in-cheek humor:
@Wouter.de.Groot: Yes, because we all know that _nobody_ is ever told to 'sudo gedit /etc/X11/xorg.conf' anymore, right?
If you legitimately need root privileges, you shouldn't need to jump through hoops to get them. The decrease in security is minimal in my humble opinion.
There is a good reason this is needed (for editing files). The XP security model did show that if you make it difficult for people to do their stuff as root, they will just enable root and use it 24/7 (hence why vista has a "run as admin" dialog in explorer now and uses UAC which is like sudo).
Never force people to use the terminal to "easily" launch a GUI app with a specific file opened with root priviligies.
I'm often browsing /etc/ and know what I'm doing - do you have any idea how ennoying it is to not just be able to save as root just by trying to save a file that needs root to write followed by getting the good old "Type the root password to continue" (or something like that) dialog?
I hate to have to open the terminal to do something that GUI apps need to be able to do.
In particular for me, I like to use the Deskbar Applet and Tracker to find config files and then just double-click to open them...except that then the file is opened as a user, and I need to manually navigate to the location in Nautilus and select "Open with sudo". Not convenient.
The new authentication system just needs to be adopted by more programs and in more ways, so that when ever a user requests root access, they can then supply their credentials or whatnot. But yes, this is really an important step in helping to eliminate the requirement for the command line. Freedom = good.