72 lines
2.7 KiB
Plaintext
72 lines
2.7 KiB
Plaintext
== Starting native applications
|
|
|
|
It is sometimes difficult to start a native application on a result
|
|
document, especially when the result comes from a container file (ie: email
|
|
folder file, chm file).
|
|
|
|
The problem is that native applications usually expect at most a file name
|
|
on the command line, and sometimes not even that (emailers).
|
|
|
|
The _Open parent documents_ link in the result list right click menu is
|
|
sometimes useful in this situation (e.g.: +chm+ files).
|
|
|
|
In some other cases it may help that Recoll does make a lot of data
|
|
available to the application. This data may have to be pre-processed in a
|
|
script before calling the actual application.
|
|
|
|
Details about configuring how the native application or script are called
|
|
are given with the
|
|
link:http://www.recoll.org/usermanual/usermanual.html#RCL.INSTALL.CONFIG.MIMEVIEW[description of the mimeview configuration file]
|
|
|
|
Information about
|
|
link:http://www.recoll.org/usermanual/usermanual.html#RCL.INSTALL.CONFIG.FIELDS[configuring
|
|
customised fields] may also be useful in combination.
|
|
|
|
=== Example
|
|
|
|
This is a simple example, because it does not need to use special
|
|
fields. It just shows how to solve a simple issue by using an intermediary
|
|
script. The problem is due to the fact that thunderbird's +-file+ option
|
|
won't open a file if the extension is not '.eml'. Jorge, the kind Recoll
|
|
user who supplied the example stores his email in Maildir++ format, the
|
|
file names have no extension, so an intermediary script is necessary to get
|
|
thunderbird to open them:
|
|
|
|
Note that this only works with messages stored in Maildir or MH format (one
|
|
message per file). As far as I know, there is no way to get Thunderbird to
|
|
open an arbitrary mbox file.
|
|
|
|
The 'recoll-thunderbird-open-file' script:
|
|
|
|
----
|
|
#!/bin/sh
|
|
cp $1 /tmp/$$.eml
|
|
thunderbird -file /tmp/$$.eml
|
|
----
|
|
|
|
Create the file in an editor, save it somewhere, and make it executable
|
|
(`chmod +x recoll-thunderbird-open-file`).
|
|
|
|
The mail line in the '~/.recoll/mimeview' file:
|
|
|
|
----
|
|
[view]
|
|
message/rfc822 = recoll-thunderbird-open-file %f
|
|
----
|
|
|
|
If the place where you saved the script is not in your PATH, you will need
|
|
to use the full path instead of just the script name, as in
|
|
|
|
----
|
|
[view]
|
|
message/rfc822 = /home/me/somewhere/recoll-thunderbird-open-file %f
|
|
----
|
|
|
|
You should then be able to open the messages in Thunderbird, which is
|
|
useful, for example, to handle the attachments.
|
|
|
|
With recent Recoll versions, if using the normal option of letting the
|
|
Desktop chose the _Open_ application to use (_Use Desktop default_),
|
|
you should also add +message/rfc822+ to the exceptions, and the whole
|
|
thing is probably more easily done from the Recoll GUI.
|