Ubuntu ‘Open as Root’ Script

by Soddengecko @ 2:07   Linux / Unix | Tech   Permalink

Open a terminal window and enter:

gedit ~/.gnome2/nautilus-scripts/openas-root

Now add this code to the file

#!/bin/sh
### openas-root:
### written by alexp
### nautilus script for opening the selected files as superuser (uid=0),
### utilizing the appropriate applications.

for uri in $NAUTILUS_SCRIPT_SELECTED_URIS; do
gksudo “gnome-open $uri” &
done

### end of file.

Save and close this file.

Now enter this command into the terminal window:

chmod +x ~/.gnome2/nautilus-scripts/openas-root

Your all done. Right click any file or folder and under scripts you will find - openas-root

Enjoy.

Comment posted by:
IAmEntity

Posted on:
27-05-2008 @ 03:27:11

Unfortunately, this didn’t work for me. I am using a hackaround via consolehelper to gain admin (I use Fedora 9, and don’t have such commands as gksu, gnomesu, etc)
Nautilus exclaims “No protocol specified!”

Do you want to leave a reply?


XHTML: You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



Contact