we often need to edit files as root in a text editor. Now we can do this with a right click in Nautilus (no big deal about opening in terminal but what the heck!)
Copy the following lines into the file and save it and close it.Code:gedit ~/.gnome2/nautilus-scripts/gedit-root
Then make it executable withCode:#created by arnieboy foo=`gksudo -u root -k -m "enter your password for gedit root access" /bin/echo "Do you have root access?"` sudo gedit $NAUTILUS_SCRIPT_SELECTED_URIS
thats it you are all set. Now right click on any file in nautilus and under "scripts" u will find "gedit-root"Code:chmod +x ~/.gnome2/nautilus-scripts/gedit-root
click and enjoy!
U can even select multiple files and open them in gedit as root in tabbed windows just by right clicking and using this script. The possibilities are endless.


Adv Reply




Bookmarks