Ubuntu QA:
BlogBrainstormPackage status
Log in
Ubuntu QA
The Ubuntu community has contributed 21986 ideas, 135057 comments, 2615221 votes
Idea sandbox Idea sandbox
Popular ideas Popular ideas
Ideas in development Ideas in development
Implemented ideas Implemented ideas
Idea #1059: Administrative mode for gedit

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.
Tags: (none)

504
votes
up equal down
Solution #1: Auto-generated solution of idea #1059
Written by jouva the 29 Feb 08 at 07:25.
Ubuntu Brainstorm was updated in January 2009. Since the idea #1059 was submitted before this update, its rationale and solution are not separated. Please vote accordingly, and if you have the necessary rights, please separate the rationale from the solution. Thanks!
126
votes
up equal down
Solution #2: Add built-in edit-as-root support
Written by mahdif62 the 29 Nov 09 at 22:10.
I suggest that a Save as root or edit as root option becomes available, either inside gedit menus or in the file save dialog, asking:
"You don't have permissions to change this file, do you want to do it as root?"
58
votes
up equal down
Solution #3: sol1 + confirmation
Written by shababhsiddique the 30 Nov 09 at 12:36.
Nothing to describe. The edit will only be saved after root password confirmation.
-27
votes
up equal down
Solution #4: Shift+Right-Click for "Admin Menu"
Written by Darwin Survivor the 1 Dec 09 at 06:13.
How about creating a second clone-context-menu when that allows any action (run, edit, view, copy, move, delete, etc) to be performed. The special menu could be activated by "Shift+Right-Click" or something similar.

This would solve many of the missing PolicyKit integration that jeypeyy mentioned (below).
20
votes
up equal down
Solution #5: Notification
Written by Immanuel the 12 Jan 10 at 11:42.
Gedit should notify the user that the file is read-only to him and prevent editing. Ideally the user would get a red bar at the top of the file pane where he can select "switch to root" which then asks for the password and unlocks the text area.

Propose your solution

Attachments
No attachments.


Duplicates


Comments
Brewboy wrote on the 29 Feb 08 at 08:26
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.

pimlottc wrote on the 29 Feb 08 at 08:38
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.

yman wrote on the 29 Feb 08 at 10:11
This is being worked on already, and will in all likelihood be included no later than in Hardy+1. It might even get included in Hardy.

ebrahim wrote on the 29 Feb 08 at 14:05
just press Alt+F2 and run: gksu gedit

sparc128 wrote on the 6 Mar 08 at 00:21
install nautilus-gksu
restart gnome (logout/in)

"Open as Administrator" shows up in Nautilus right click

Thelasko wrote on the 13 Mar 08 at 18:24
There are scripts that do this but it would be nice if it was installed by default.

andruk (Idea reviewer) wrote on the 23 Mar 08 at 07:26
Isn't this implemented with the new PolicyKit in Hardy from Novell (they are good for something)?

chrisccoulson wrote on the 22 Apr 08 at 20:10
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.

Have a look at http://bugzilla.gnome.org/show_bug.cgi?id=524199

I'm sure this has been discussed somewhere before but I can't remember where.

jeypeyy wrote on the 28 Apr 09 at 14:32
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.

Endolith wrote on the 25 May 09 at 02:34
Uhh... Synaptic doesn't use it. The command to start Synaptic still has gksu before it in Jaunty.

Yes, policykit would be the best way to do this for all apps. Is there any workaround besides running gksu gedit?

jeypeyy wrote on the 11 Oct 09 at 16:02
Lol, yeah you're right. But Add/remove does.


Post your comment