PDA

View Full Version : Access parameters from Nautilus in shell script



thelinuxguy
April 16th, 2007, 02:41 PM
Referring to my post at http://ubuntuforums.org/showpost.php?p=2457295&postcount=8, is there any way a shell script can access what Nautilus would pass to an application/extension registered to start on clicking a menu item in the context menu? This data doesn't seem to be accessible to the script via positional parameters. Any ideas anyone?

WakkiTabakki
April 16th, 2007, 07:32 PM
Here are a few
NAUTILUS_SCRIPT_SELECTED_FILE_PATHS: newline-delimited paths for selected files (only if local)
NAUTILUS_SCRIPT_SELECTED_URIS: newline-delimited URIs for selected files
NAUTILUS_SCRIPT_CURRENT_URI: URI for current location
NAUTILUS_SCRIPT_WINDOW_GEOMETRY: position and size of current window

Edit!
Found the url I was looking for https://help.ubuntu.com/community/NautilusScriptsHowto

Good luck
/N

thelinuxguy
April 16th, 2007, 07:49 PM
Great!!! Looks exactly like what I was looking for. Ill go through the page.
Thanks a ton.