Ubuntu QA:
BlogBrainstormPackage status
Log in
Ubuntu QA
The Ubuntu community has contributed 21545 ideas, 132412 comments, 2606687 votes
Idea sandbox Idea sandbox
Popular ideas Popular ideas
Ideas in development Ideas in development
Implemented ideas Implemented ideas
Idea #14680: Make a save file as root option, even if a normal user opened gedit

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.
Tags: access gedit root

66
votes
up equal down
Solution #1: Have user enter password, cancel, or save a copy
Written by SoftwareExplorer the 22 Oct 08 at 02:14.
I think it would be better to have gedit say something like "you need root privileges to save the changes in this file" and ask if you want to provide the root password, cancel saving it, save a copy somewhere else or to close without saving. From what I understand, it shouldn't be hard to use Policy Kit to do this. This could also be possibly extended to other applications that are used to modify root files.

Propose your solution

Attachments
No attachments.


Duplicates


Comments
dotancohen wrote on the 22 Oct 08 at 06:25
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.

Wouter.de.Groot wrote on the 22 Oct 08 at 20:22
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.

+1

Auzy wrote on the 22 Oct 08 at 23:36
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).

+1

Natanael_L wrote on the 23 Oct 08 at 12:16
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.


... Or do you use Nano?

Auzy wrote on the 23 Oct 08 at 12:23
Well, thats the thing.. In windows I could remove command prompt and do everything I ever needed. In linux, not a chance!

asaz989 wrote on the 18 Jan 09 at 23:57
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.

+1

Yfrwlf wrote on the 20 Jan 09 at 04:14
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.


Post your comment