Skip navigation.
Home

Creating an Open With menu

ROX-Filer has an Open With feature, but it's called Send To instead.

The SendTo menu is easily opened by right-clicking over a file with the Shift key held down. Choosing a program from the menu acts like dragging the file to it. One particularly useful program to add to this menu is Archive (for compressing files and directories).

You can also set certain programs to only appear when you click on files of a particular type (see the help message from the File -> Customise menu item):

Opening an image with the Gimp

Passing options to the program

How would I pass options to a program in the Customise or Send Too... menus?

Options

You can't. If you want to run a program with non-standard options you should create a shell script, e.g.

#!/bin/sh
exec the-program --options "$@"

and add that to the Customise or Send To menus.

exec

Thanks for the reply, I stumbled upon a bash script and came to almost the same conclusion but without the "exec" pre-command.

The man page for exec states that it, "replaces the shell without creating a new process". Am I correct in assuming that replacing the shell you are saving system resources? If not then what is the benefit of using the exec command?

Re: exec

The man page for exec states that it, "replaces the shell without creating a new process". Am I correct in assuming that replacing the shell you are saving system resources?

That's exactly it.

Not every script works...

I have Puppy 3.01 installed on my machine and there is a script called "undeb" under /root/my-applications/bin/. Actually it is single line:
#!/bin/sh
exec dpkg-deb2 -x "$@" .

When I run this script from shell from within directory where .deb file located it works like a charm, but when I try to add this script to "Set Run Action" or "Send To" menu and click on .deb file this doesn't work.
I started rox -n with debugging option=on in this script and I can see that for some unknown (for me) reason I get wrong pwd from ROX window:

-from shell:
#pwd
/root/my-documents/test

-and from "rox -n":
#!/bin/sh -xv
wd=`pwd`
pwd
++ pwd
+ wd=/root
echo $wd
+ echo /root

Any other program works fine - Gimp, mtpaint - any!...
What could be wrong with that??

Re: Not every script works...

Thank you!

Thank you very much!
Actually, I have solved the problem this night in a much more heavy way - 2 days of ABS-ing + googling, but I'm sure it would play a great positive role for me in the future :-)
At least again I see that one should be more attentive while reading FAQ :-o

Syndicate content