<<< Date Index >>>     <<< Thread Index >>>

Re: Mailcap question



El viernes 23 de junio a las 08:20:12 CEST, Cameron Simpson escribió:
> Um, yes, you are right. I understand the "sleep" now.
> 
> | I have the following setting
> | set tmpdir=~/.mutt/tmp (i.e, not the /tmp sticky directory)
> 
> Seems sensible to me.
> 
> If you put the "sleep" back in, do thing work or fail? If they fail,
> what errors do you get?
> 
> You could make your line:
> 
>   text/html; dillo %s >>/tmp/mailcap.out 2>&1 </dev/null & sleep 5; 
> description "HTLM Files"
> 
> and look at the file /tmp/mailcap.out for error messages from dillo,
> perhaps.

This works for dillo, but not for others as openoffice. I like the
approach of the muttpawn.sh command suggested by Kyle, but is neccesary
to execute the definitive command in a subshell, as is showned below:


#!/bin/sh
file="$1"
saved="$file.saved"
shift
mv "$file" "$saved"
( "$@" "$saved" >/dev/null 2>&1 ; rm "$saved" ) &


The mailcap lines could be:

text/html; ~/bin/muttspawn.sh %s dillo ; description="Html files"
application/msword; ~/bin/muttspawn.sh %s openoffice; test=test "$DISPLAY" != 
""; nametemplate=%s.doc; description="Microsoft Word Document"


Regards

Attachment: signature.asc
Description: Digital signature