Tuesday, November 11, 2014

Thunar actions - add a command that works in Terminal

Some actions that work in Terminal do not work as such in Thunar actions and do not work in a Thunar action that invokes a Terminal window with that initial command.

The first does not work because Thunar actions seem to call the command with bash and makes the use of terminal superfluous.

The second does not work when the selection is a directory because the current directory is then one level up. So you need to first cd into the target before running the command.


So, if the <command> works in a terminal window opened in a target directory, in order to make that work as a Thunar custom action for the same directory, adapt the command as follows:

cd %f && <command>

No comments:

Post a Comment