Gentoo Archives: gentoo-user

From: Walter Dnes <waltdnes@××××××××.org>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] mutt - view pdf files
Date: Sun, 12 Jan 2014 01:24:20
Message-Id: 20140112012350.GB15127@waltdnes.org
In Reply to: [gentoo-user] mutt - view pdf files by Joseph
1 On Sat, Jan 11, 2014 at 12:08:15PM -0700, Joseph wrote
2 > I'm using mutt and trying to view pdf files using evince but it is
3 > not working.
4 >
5 > I have added to /etc/mailcap application/pdf; evince %s;
6 > description="Postscript files"; test=test -n "$DISPLAY" -a -n "`which evince 2>/dev/null`"
7 >
8 > but it makes no difference. What am I doing wrong :-/
9
10 Questions;
11
12 1) Why are you modifying /etc/mailcap ? Are you aware that ~/.mailcap
13 overrides /etc/mailcap, and is the recommended way to go? If you have
14 an entry for application/pdf in ~/.mailcap then changing /etc/mailcap
15 won't help.
16
17 2) I use mupdf; should be similar. My ~/.mailcap has the line...
18
19 application/pdf; /usr/bin/mupdf '%s' ; test=test "$DISPLAY" != ""
20
21 ...so try...
22
23 application/pdf; /usr/bin/evince '%s' ; test=test "$DISPLAY" != ""
24
25 ...in your ~/.mailcap
26
27 3) Are you sure that all pdf's are coming in as application/pdf ? A
28 few years ago, my ISP "went Microsoft", and changed their pdf billing
29 statements from application/pdf to "application/octet-stream". This
30 requires the following entry in ~/.mailcap (or /etc/mailcap if you
31 insist)
32
33 application/octet-stream; mimeopen %s
34
35 The first time it encounters an "application/octet-stream" file with a
36 pdf extension, you'll get a dialogue, asking which program to use. It
37 can be set to use that program without asking again. mimeopen maintains
38 a list of the different programs to use with different file-extensions.
39 If you don't have mimeopen installed, you can...
40
41 emerge dev-perl/File-MimeInfo
42
43 ...to install it.
44
45 --
46 Walter Dnes <waltdnes@××××××××.org>
47 I don't run "desktop environments"; I run useful applications

Replies

Subject Author
Re: [gentoo-user] mutt - view pdf files Joseph <syscon780@×××××.com>