1

I see here that, in order to add as custom action in Thunar the search with gnome-search-tool, the command is:

gnome-search-tool –path=%f

and with catfish it is different:

catfish --fileman=thunar --path=%f

(Why the difference, by the way?)

What's the one for Searchmonkey?

(The above do not seem to work for it.)

4 Answers 4

2

I know this is almost 6 years later yet this workaround is quite nice. In Configure custom actions edit the catfish command from:

    catfish --path=%f

to

    searchmonkey --directory=/

or

    searchmonkey --directory=/home

or any path you like and it will start up ready to search what ever path you insert of course. The first command with the search starting at root (=/) will scan every hard drive you have. So far no command options found to search the folder you would right click upon. Possible to make two context menu entries and have one named root and the other named home or whatever path you like. Hope this helps.

1

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.

2
  • does that mean that a script like in your answer for wine programs (askubuntu.com/a/219370/47206) is also out of discussion here?
    – user47206
    Nov 28, 2012 at 13:20
  • 1
    @cipricus I tried using a script to see if that would act as a workaround, but searchmonkey still didn't open at the selected folder, but only at /home/mike.
    – user76204
    Nov 28, 2012 at 13:21
1

Please note, as of Searchmonkey v0.8.3 we now accept the command-line args, like this:

$ searchmonkey -d {directory} -f {filename} -t {containing text}

For example:

$ searchmonkey -d /home/tux -f txt -t linux

will open searchmonkey configured to scan directory /home/tux to search files containing txt in their names and search inside the files for the string linux.

ONE to THREE parameters (-d and/or -t and/or -f) are also allowed, and of course -? will display help!

Let me know how you get on!

0

Very nice. Here is how I use searchmonkey 0.8.3 in nemo, as a 'search here' script. (placed in /home/$USER/.local/share/nemo/scripts/)

#!/bin/sh

# This only works with searchmonkey 0.8.3+
#passes nemo directory string to 'obj' string

obj="$NEMO_SCRIPT_CURRENT_URI"

#This cuts off the first 7 characters from the string.
#Nemo adds 'file://' to the beginning of the directory string.
#It confuses searchmonkey, and must be clipped off.

CURDIR=`echo $obj | cut -c 8-`

#Add this if you want to see the formatted string, before searchmonkey executes.
#(For testing purposes only. not needed)

zenity --info --text=$CURDIR --no-wrap

#executes searchmonkey, and passes formatted directory string to it.

searchmonkey -d $CURDIR

Hope this helps anyone using nemo file manager (works in peppermint 10)

You must log in to answer this question.