[Thunar-dev] Configure Custom Actions

Tim Alexander dragonfyre13 at gmail.com
Wed Jan 25 17:46:14 CET 2006


Hello eveeryone! I'm new, so please be kind. I'm not a very
experienced programmer, though I'm picking things up, so I may be able
to help out in the future. For now, I'm a Software Test Engineer for
Bayer Healthcare.

I found a bug in the system, and thought I should report it. When I
set  a custom action, it puts single quotes around everything that was
a special character in the command that was issued. IE:

Assuming;
1. Command is meant to open readme.txt as root in gedit.
2. You are in the /home/user directory.

Custom Action 1:
sudo gedit %n

Command Executed 1:
sudo gedit /home/user/'readme.txt'

Resulting Issue 1:
A filename is assumed to be 'readme.txt'
It should be readme.txt

Command Action 2:
sudo gedit %f

Command Executed 2:
sudo gedit /home/user/'/home/user/readme.txt'

Resulting Issue 2:
The path is passed to gedit, along with the current path, making gedit
unable to find the file.
The single quotes still present a problem, as gedit throws an error
when attempting to save.

Solution 1:
Remove the single quotes, and replace them with double quotes (")

Solution 2:
Have special paramaters (%n, %f, %N, %F, %d, %D) totally strip the
path before evaluating the special parameter.



More information about the Thunar-dev mailing list