[gedit] "Edit a text file as root" when a user is in "admin" group

Lukas Vacek vaceklukas at email.cz
Sun Mar 8 14:28:01 GMT 2009


I think it would be handy to have an option to "open file with text editor as root", especially, when recovering a system from a live CD, but not only in that case. It would be useful just any time a user is told to edit a system file "by hand", which still can happen sometimes. Now the user has to use a terminal, know sudo and more.

I guess there are basically two ways to do it, add support to gedit for gaining privileged permissions only for read/save operations, but all that gobject code is a bit too scary for me :-) or much easier but potentially not that secure way:

It could be enough to install a file like this:

$ cat /usr/share/application-registry/gksudogedit.applications

    command=gksudo gedit
    name=Text editor as root

(with permissions root:admin 750) and run update-mime-database and so on.

Lukáš Vacek

More information about the ubuntu-desktop mailing list