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

Re: mailcap



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

On Wednesday, October  4 at 05:09 PM, quoth Andreas Kalex:
>> > application/pdf; pdftotext -layout %s -; copiousoutput
>well this works fine for me too and so did it:
>application/pdf ; /usr/bin/xpdf %s ; copiousoutput
>
>but it dont work to use both entries in mailcap. The first entry is
>found and (in the above sequence, this is pdftotext) this entry is
>always and not the 2nd one with  xpdf. When using mutt in xterm under X
>it would be nice that  xpdf (or acroread) is to be used. 

What you probably want to do is this:

application/pdf; pdftotext -layout %s -; copiousoutput; needsterminal; 
test=test -z "$DISPLAY"
application/pdf; xpdf %s; copiousoutput; test=test "$DISPLAY"

What this does is asserts that one will be used if X is available, and 
the other will be used if X is not available.

~Kyle
- -- 
Strong coffee, much strong coffee, is what awakens me. Coffee gives me 
warmth, waking, an unusual force and a pain that is not without very 
great pleasure.
                                                 -- Napoleon Bonaparte
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iD8DBQFFI9BnBkIOoMqOI14RAkRuAJ92vqjr4pNHdGP81TG4PE5VpcPvIQCfU7/t
GfgodNLIsYPPyldE13Sg48g=
=IgHJ
-----END PGP SIGNATURE-----