I think the main problem is that the Thunar
command %F
is probably not going to work when applied to a Wine
program. Often the best way with Thunar
custom actions is to use a script and apply the correct parameter to that: i.e.
/home/mike/foo_script %F
then the parameter can apply to the script.
The script I have experimented with is at the hydrogenaudio forums, and I have modified it slightly, but credit to that forum. There is a lot of useful information on that forum about foobar.
#!/bin/bash
cd ~/.wine/drive_c/"Program Files"/foobar2000/
if [ "$1" != "" ]; then
filename=`echo z:$1 | sed 's/\\//\\\\/g'`
wine foobar2000.exe "$filename" &
else
wine foobar2000.exe &
fi
Copy the script into a text editor, but make sure you place the correct location of your foobar directory in the script, make it executable and enter its location in the Thunar
custom actions dialogue (as in the screenshot below). As you know, select audio files and folders in the other 'appearance conditions' tab.
Once it has been added as a Thunar
custom action with the correct parameters, the script further above allows you to add and then play your music in Foobar
just by right clicking on a single track or a folder and selecting your custom menu item.
Here is Foobar
launched with the custom action and playing a folder of Duke Ellington:
In addition, you could probably modify the script and also use it for other wine applications just by changing the name (foobar2000) of the application and the application folder. Then you could create a new script and another different custom action.
With gnome-search-tool
and catfish
, command-line options are available and so the programs can integrate into Thunar quite nicely; the --path=%f
option is important as that means the location of the selected folder (with its files) can be passed on to these search tools so they open at the right folder.
If you enter the name of the program and then add--help
, you will see all the command-line options for these two search tools: for gnome-search-tool --help
we have many options such as:
--named=STRING Set the text of "Name contains" search option
--path=PATH Set the text of "Look in folder" search option
With catfish
there are similar options, but it used to be essential to specify --fileman=thunar
in addition to --path=%f
. This was found to be necessary as catfish used to only open the home folder, not the one selected if the fileman workaround was not used. However, it works now with just --path=%f
with Catfish 0.3.2 and Thunar 1.2.3 on Xubuntu 12.04.
It doesn't seem to be possible to pass any command-line options to searchmonkey
, and there doesn't seem to be any information available: the mailing-lists and forums seem pretty empty. Even if you set the filemanager and options in searchmonkey > settings > preferences > systemcalls, and then specify options in the custom action, it doesn't seem to integrate into Thunar
successfully.
Searchmonkey
doesn't seem to integrate with other filemanagers either after testing, so it must be because it does not accept any suitable command-line options. The only way to make it integrate would be to create a patch for it and recompile it, which is probably not really worthwhile considering how useful catfish
is.
Best Answer
It appears that this is indeed possible. Following are specific instructions to add such an action, taken from the Xfce site.
Opening a root Thunar
Name: Open a root Thunar here
Command: gksu thunar %f
File pattern: *
Appears if selection contains: Directories