View Full Version : [SOLVED] [SOLVED] HOWTO: right click and open a file in Nautilus with gedit as root
arnieboy
October 13th, 2005, 11:12 PM
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!)
gedit ~/.gnome2/nautilus-scripts/gedit-root
Copy the following lines into the file and save it and close it.
#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
Then make it executable with
chmod +x ~/.gnome2/nautilus-scripts/gedit-root
thats it you are all set. Now right click on any file in nautilus and under "scripts" u will find "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.
MButterman
October 14th, 2005, 02:10 AM
Thanks Arnie,
Breezy has been doing great. I have a question off topic though. Since I have k3b for my cd burning, how would I change the default player for mp3's from sound juicer to xmms. I have all codecs installed. thanks for the script. I've been looking for a way to do this without terminal.
My Best,
MButterman
Nomearod
October 14th, 2005, 02:31 AM
Tanks for the how-to. This is really going to help me ^_^
i'm a noob at Linux. and sometimes I need to edit some files and I don't like go to the terminal and do the things there..
mgor
October 14th, 2005, 03:02 PM
great tip!
arnieboy
October 14th, 2005, 03:05 PM
Thanks Arnie,
Breezy has been doing great. I have a question off topic though. Since I have k3b for my cd burning, how would I change the default player for mp3's from sound juicer to xmms. I have all codecs installed. thanks for the script. I've been looking for a way to do this without terminal.
My Best,
MButterman
open nautilus, right click on any mp3 hit properties and change the default player from there.
manicka
October 14th, 2005, 03:58 PM
Thanks arnieboy, this script since you made it available in hoary, has been something I have used extensively.
arnieboy
October 14th, 2005, 06:35 PM
Thanks arnieboy, this script since you made it available in hoary, has been something I have used extensively.
thank u for all the appreciation manicka :)
oldlucky
October 15th, 2005, 04:03 AM
Thankyou so much arnieboy that is a great tip.This is such a great forum you learn so much on here.:smile:
Cheers oldlucky
hanzj
October 15th, 2005, 08:05 AM
how about a nautilus hack that allows sudo access to moving/renaming/et cetera of restricted folders/files?
Omnios
October 16th, 2005, 01:57 PM
Cool Im also looking for right click open file as root. Used mostly to play abound with and update games with hacks and patches.
Edit re: does it work in 5.10 noticed that before end edited while you where posting. I was doing a bunch of searches and confused it with a 5.04 post
arnieboy
October 16th, 2005, 01:58 PM
Does this work properly in Breezy
if it hadnt, i wudnt post it here.. wud I?
Jaivaz
October 17th, 2005, 12:43 PM
A quick little question here. I enjoy using Mousepad more than gEdit, so if I changed a few things in the script to "mousepad" it should still work the same, correct?
arnieboy
October 17th, 2005, 12:44 PM
A quick little question here. I enjoy using Mousepad more than gEdit, so if I changed a few things in the script to "mousepad" it should still work the same, correct?
since I dont use (and have never used Mousepad) i cant say. u can test and find out.
lucaas
October 17th, 2005, 04:12 PM
The script seems doesn't work in Breezy, i choose the gedit-root script in the right-click menu, but there is no response.
Thanks your work all the same
lucaas
arnieboy
October 17th, 2005, 04:16 PM
The script seems doesn't work in Breezy, i choose the gedit-root script in the right-click menu, but there is no response.
Thanks your work all the same
lucaas
"doesn't work in breezy" is wrong. "doesn't work for u" is more correct.
did u follow all the steps that I outlined? and are u sure u pasted the correct contents in the script and made it executable?
lucaas
October 17th, 2005, 04:56 PM
I must make sth. wrong that i don't know.
I have followed your guide, just copy and paste the codes, but it still doesn't work for me. :-(
I type ~/.gnome2/nautilus-scripts/gedit-root in the terminal, gedit can run as root
Is there other thing I have to be careful?
THANKS for your help
pminetti
October 18th, 2005, 05:37 PM
Arnieboy:
It works very well but I like if you can explain a little how it works
thanks
arnieboy
October 18th, 2005, 05:38 PM
Arnieboy:
It works very well but I like if you can explain a little how it works
thanks
which part of the script could you not understand?
tomski
October 19th, 2005, 05:16 PM
thank you for the tip arnieboy cheers
mcrosmar
October 21st, 2005, 02:44 PM
Great tip arnieboy. Thank you.....
monotux
October 21st, 2005, 06:09 PM
Great tip!
Thanks :)
LinuxWiz83
October 25th, 2005, 04:17 PM
What if that file is missing and you have gedit?
arnieboy
October 25th, 2005, 05:04 PM
What if that file is missing and you have gedit?
it will refer u to an IQ test.
mjkey
October 27th, 2005, 06:57 PM
Thank you for the great tip. A folder of great tips would sure help a simpleton like myself.
Sionide
October 28th, 2005, 09:41 AM
Quality, nautilus scripts are one of those awesome features which aren't shown off enough.
hanzj
October 28th, 2005, 10:04 AM
what other nautilus scripts would be handy?
what other nautilus scripts are available?
:-({|=
Sionide
October 28th, 2005, 10:13 AM
Loads, check out; http://g-scripts.sourceforge.net/index.php
dez
October 28th, 2005, 10:15 AM
This is slightly off topic , but I am having a really dumb moment.
How can I edit my right click context menu. In Hoary, it use to have "New Terminal", but in Breezy its gone. I want it back.
Thanks
23meg
October 28th, 2005, 10:25 AM
Those who found this handy may also be interested in this trick: http://ubuntuforums.org/showthread.php?t=24008
hanzj
October 28th, 2005, 04:46 PM
The thread which 23meg refers to (and is original poster of) is handy, but I recommend you follow the instructions of alexp (post #8 ) (http://ubuntuforums.org/showpost.php?p=128057&postcount=8) to get that hack going.
:-({|=
manicka
November 3rd, 2005, 06:04 AM
This How-To is also available at the Ubuntu Document Storage Facility (http://doc.gwos.org/index.php/Main_Page)
LinuxWiz83
November 10th, 2005, 02:51 AM
it will refer u to an IQ test.
hey now you did not have to say it like that. I just was not awake obviously that day but thank you for the tip.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.