Nov 25, 2007

Opening file as root with just few clicks...

[I tested it in ubuntu]
For basic user, I hope need not to go to terminal for any of of the region beside editing a file as root. You might feel bored about this. Here's a handy shortcut... ( yea, you wont need to go to terminal each time.)

First goto to the following directory create a file.
/home/<current_user>/.gnome2/nautilus-scripts

create a file with name "Open as root"
and copy and paste all this code into the file:
for a in $NAUTILUS_SCRIPT_SELECTED_URIS; do
gksudo "gnome-open $a" &
done


and save that.


and its done...

Right click on any file/ folder while browsing from "nautilus" and goto the Scripts menu and select "Open as root" .... give your password to open it.

Note: You should be in sudo-ers list to accomplish this.

No comments: