I'm describing this from a user's POV because I am not a programmer, so I don't know the intricacies of this. Basically, I use urxvt as my terminal of choice. I have tried to configure urxvt to be used in the 'configure custom actions' Open Terminal here. urxvt doesn't seem to have a way to call it like Terminal's --working-directory or whatever it was. The only way I could think to get urxvt to open the current directory is to use: "(cd %f; urxvt) &" This works from another terminal, but Thunar replies with: "Failed to launch action `Open Terminal Here'. Failed to execute child process "(cd" (No such file or directory)." I don't know if this is a bug with thunar or if I should be providing some other action for opening urxvt. Reproducible: Always Steps to Reproduce:
The thunar-uca plugin doesn't execute your command in a shell, but executes it directly. But since 'cd' is a shell builtin, your command doesn't work here. You'll need to invoke the shell and let it handle your command, i.e.: sh -c '(cd %f && urxvt)'
You can even leave out the parenthesis.
Thank you, that worked perfectly :) I admit that I don't really understand the nuanced differences between the shell and what Thunar asks for. I don't suppose Thunar should try to check if a shell was needed as a failsafe, and then add the sh -c itself? Or maybe I am not the typical use case. Glad to have it working though!
The shell does some parsing on the commands and thunar-uca does some parsing on the command (the %<whatever> replacements). If we would simply use the shell to execute the command, the result could cause trouble in some cases where the shell tries to expand certain parts of the command again (i.e. file names with a * in it, etc.). To avoid all this potential trouble, we simply tell the operating system directly what to execute, rather than giving the command to the shell first.