Why is it that so many Ubuntu guides tell you to do sudo gedit /path/to/somefile when there is a sudoedit command? An editor, like Gedit, doesn’t need to run as root, ever.
This is so much better and safer:
SUDO_EDITOR=gedit sudo -e /path/to/somefile
This will …
- Copy the file to
/tmp/ - Invoke
geditas your user - Update the original file if you changed the temporary file
It would of course be really useful if gksudo had this built in already, and could be used in a nice way by nautilus-gksu.
MMN-o