I am trying to follow this tutorial to add "Open as root" right click to gnome on my debian system. http://www.pendrivelinux.com/how-to-open-files-as-root-via-a-right-click/

I type "gedit .gnome2/nautilus-scripts/Open\ as\ root" in a root terminal.
I paste the specified text.
I press Save.
I get "file not found" error.

I suspect my problem has to do with this note in the tutorial "Your "$Home/.gnome2" path may vary"

But how do I determine my "$Home/.gnome2" path?

link|improve this question

75% accept rate
add output "file ~/.gnome2" and "file ~/.gnome2/nautilus-scripts/" – alvosu Feb 9 '11 at 9:09
feedback

1 Answer

Probably the directory nautilus-scripts in ~/.gnome2 is missing.

You could check the contents of your $HOME environment variable typing

echo $HOME

in a terminal. The HOME variable is ALL upper case.

With the commands

cd

without any arguments, you can change your current working directory to your $HOME. You could also type

cd $HOME

or

cd ~

all three above are equivalent (at least as long as $HOME has been set correctly and not overwritten) .

With

ls .gnome2

you could check if the .gnome2 directory exists in the current working directory where you type this command. Or type

ls ~/.gnome2

to check the existence of .gnome2 in your $HOME. If the directory does not exist you will get an error message. If the directory does exist, then the command will display the contents of the directory There you should look for the presence of the directory nautilus-scripts where you are trying to open a new or existing file "Open\ as\ root". The command

ls ~/.gnome2/nautilus-scripts

will show you the contents of the directory ~/.gnome2/nautilus-scripts if it exists. You could create both of these directories typing the command

mkdir -p ~/.gnome2/nautilus-scripts
link|improve this answer
my $HOME appears to be /root, but there is nothing in there. Are you sure simply creating the directories with mkdir will work with the tutorial? – Matt Feb 9 '11 at 9:51
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.