! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Parsing of 'custom actions' with parantheses
Status:
CLOSED: INVALID

Comments

Description Scott H 2006-02-06 20:14:56 CET
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:
Comment 1 Benedikt Meurer editbugs 2006-02-06 20:19:08 CET
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)'
Comment 2 Benedikt Meurer editbugs 2006-02-06 20:19:27 CET
You can even leave out the parenthesis.
Comment 3 Scott H 2006-02-06 20:32:58 CET
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!
Comment 4 Benedikt Meurer editbugs 2006-02-06 20:37:03 CET
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.

Bug #1437

Reported by:
Scott H
Reported on: 2006-02-06
Last modified on: 2009-07-17

People

Assignee:
Jannis Pohlmann
CC List:
0 users

Version

Version:
0.2.1svn

Attachments

Additional information