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