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

Re: Mailcap question



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday, June 19 at 06:00 PM, quoth José G. Juanino:
> It does not work for me at least. I have the following entry in my 
> .mailcap file:
>
> text/html; dillo %s >/dev/null 2>&1 </dev/null & ; description "HTLM Files"
>
> and dillo complains about the input file has vanished. I think mutt 
> removes the file when no process holds the file open, as it uses the 
> unlink system call after the temp file is created.

Yeah... mutt does that. The way around it is to use something like a 
protector script that does its own file management/cleanup. For 
example, if you create this script (let's call it ~/.muttspawn.sh, 
just for example's sake):

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

...and then in your .mailcap you can put:

    text/html; ~/.muttspawn.sh %s dillo & ; description "HTML Files"

And it should Just Work (tm).

~Kyle
- -- 
Asking whether machines can think is like asking whether submarines 
can swim.
                                                            -- Unknown
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iD8DBQFEltngBkIOoMqOI14RApKKAJ0ef/suYBkNqKbWuEnYduHzqOyu5QCfQYcQ
iA8pz6rw5FWXvz4v2+9Gw08=
=jZGN
-----END PGP SIGNATURE-----