On Sat, Jan 11, 2014 at 12:08:15PM -0700, Joseph wrote
> I'm using mutt and  trying to view pdf files using evince but it is
> not working.
> 
> I have added to /etc/mailcap application/pdf; evince %s;
> description="Postscript files"; test=test -n "$DISPLAY" -a -n "`which evince 
> 2>/dev/null`"
> 
> but it makes no difference. What am I doing wrong :-/

Questions;

1) Why are you modifying /etc/mailcap ?  Are you aware that ~/.mailcap
overrides /etc/mailcap, and is the recommended way to go?  If you have
an entry for application/pdf in ~/.mailcap then changing /etc/mailcap
won't help.

2) I use mupdf; should be similar.  My ~/.mailcap has the line...

application/pdf; /usr/bin/mupdf '%s' ; test=test "$DISPLAY" != ""

...so try...

application/pdf; /usr/bin/evince '%s' ; test=test "$DISPLAY" != ""

...in your ~/.mailcap

3) Are you sure that all pdf's are coming in as application/pdf ?  A
few years ago, my ISP "went Microsoft", and changed their pdf billing
statements from application/pdf to "application/octet-stream".  This
requires the following entry in ~/.mailcap (or /etc/mailcap if you
insist)

application/octet-stream; mimeopen %s

The first time it encounters an "application/octet-stream" file with a
pdf extension, you'll get a dialogue, asking which program to use.  It
can be set to use that program without asking again.  mimeopen maintains
a list of the different programs to use with different file-extensions.
If you don't have mimeopen installed, you can...

emerge dev-perl/File-MimeInfo

...to install it.

-- 
Walter Dnes <[email protected]>
I don't run "desktop environments"; I run useful applications

Reply via email to