LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Nautilus scripting not working... (https://www.linuxquestions.org/questions/linux-desktop-74/nautilus-scripting-not-working-706160/)

manwithaplan 02-20-2009 05:53 AM

Nautilus scripting not working...
 
I recently changed distros to Sabayon... from gentoo. I've been impressed with entropy so far... and reduces time on updates and compiles.

I recompiled nautilus in Sabayon for optimization. I became accustomed with the option "open as administrator" So, I added a script just for this reason, because its know longer an option in the nautilus menu. Here's the code, located in ~./gnome2/nautilus-scripts

Code:

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

I'd also tried with gedit as root... Doesnt seem to work... Is there any suggestions. I also chmod +x this file.
Or, if someone can point me to directions to echo my variable paths to make sure there ok.
I know I can use console other methods... though the convenience of opening and editing a file in nautilus as a admin is a nice feature

schneidz 02-20-2009 11:01 AM

you can try debugging with:
Code:

echo uris = $NAUTILUS_SCRIPT_SELECTED_URIS > ~/g-scirpt.dbg
for uri in $NAUTILUS_SCRIPT_SELECTED_URIS; do
echo command = gksudo "gnome-open $uri" >> ~/g-scirpt.dbg    gksudo "gnome-open $uri" &
  done

take a look at:
http://g-scripts.sourceforge.net/

schneidz 02-20-2009 11:12 AM

if you know the type of file maybe you can call that program directly ?

manwithaplan 02-20-2009 03:36 PM

That was actually what I was looking for... Though my debug output was null... I had no values at all. Just a "uri=" as an output. I am going to dig through the website and work on trying to get this to work.


All times are GMT -5. The time now is 07:07 PM.