How to open files as root via a right click

View previous topic View next topic Go down

How to open files as root via a right click

Post by sunt on Tue Jun 30, 2015 3:45 pm

Adding a contextual menu item to open as root:

Open a terminal and type sudo su
Then type the following:
gedit .gnome2/nautilus-scripts/Open\ as\ root

Now add the following to the open document and save the file:
for uri in $NAUTILUS_SCRIPT_SELECTED_URIS; do

gksudo "gnome-open $uri" &

done

Back at the terminal, type:
sudo chmod +x .gnome2/nautilus-scripts/Open\ as\ root

All set, now when you want to open a file as root, simply right click the file and select Scripts-> Open as root

Note: You may need to restart to see the changes!

article by http://www.pendrivelinux.com/how-to-open-files-as-root-via-a-right-click/
avatar
sunt

Number of posts : 121
Registration date : 2008-11-14

View user profile

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum