Originally Posted by
kaibob
I don't have unrar or mplayer installed to test your command, but $NAUTILUS_SCRIPT_SELECTED_URIS won't work. Instead, you should use $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS, which returns the name of the selected file including its path, or $1, which returns the name of the selected file without its path.
For example, if the selected file is located in my home directory and is named file.txt, then
$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS returns /home/kaibob/file.txt
$NAUTILUS_SCRIPT_SELECTED_URIS returns file:///home/kaibob/file.txt
$1 returns file.txt
Thanks for your reply!
Unfortunately I can't get any of that to work. I've made the script simply:
Code:
#!/bin/sh
$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS > ~/test-01.txt
... and test-01.txt is created, but it's blank. If I make it like this:
Code:
#!/bin/sh
ls . > ~/test-01.txt
...then it functions as expected (returning a file list). I just can't get those naming functions you described to work properly - I tried all three, and they all return a blank file.
Thanks again
EDIT: this seems to work!
Code:
#!/bin/sh
unrar p -inul "$@" | mplayer -cache 2048 -
Bookmarks