How to open files as root user via right-click in Nautilus

Take from Ubuntu:Feisty Wiki:
How to open files as root user via right-click in Nautilus

- In the console type:
gedit $HOME/.gnome2/nautilus-scripts/Open\ as\ root

- Insert the following lines into the new file:
for uri in $NAUTILUS_SCRIPT_SELECTED_URIS; do
gksudo 'gnome-open $uri' &
done

- Save the edited file
chmod +x $HOME/.gnome2/nautilus-scripts/Open\ as\ root

- Open up nautilius and right click on any file -> Scripts -> Open as root

0 comments: