I think Ubuntu uses gksu to allow you to obtain root perms for GUI tasks. So,something like
Code:
gksu gedit file.txt
Alternatively, if using a command line editor you can do something like
You would probably rather use nano than vi, though, for editing.