This tutorial shows how to edit files or browse folders as root permission in Ubuntu by adding an option into file/folder right-click menu.
First, install Ubuntu Tweak.See:http://ubuntuguide.net/manager-your-ubuntu-sources-more-easily-with-ubuntu-tweak
Then,open Ubuntu Tweak from Applications->System Tools->Ubuntu Tweak and:
In left side,select Personal->Scripts–>Select “Browse as root” in Disabled Scripts area,drag and drop this into Enabled Scripts area.–>Select “Open with your favourite text editor(as root)” in Disabled Scripts area,drag and drop this into Enabled Scripts area.
Now,open your file browser and right click on an file/folder.There will be the two options: