3

Within Alpine, if I hit enter on a PDF attachment, my system brings up Okular. I would prefer if it brought up Evince, because that's the PDF viewer I normally use. How can I do that? This is clearly a MIME issue, but I'm not sure how to (re)-configure things to make this work.

/etc/mailcap is probably relevant. it has bucketloads of stuff in it, and mentions both Okular and Evince in the context of PDF without obviously preferring one over the other.

UPDATE: Actually, this answer to an earlier question of mine might do the trick as well. Need to check.

UPDATE 2: I ran

xdg-mime default evince.desktop application/pdf

and now I see an entry in ~/.local/share/applications/mimeapps.list

application/pdf=evince.desktop

under both the sections "[Added Associations]" and "[Default Applications]", but Alpine is still using Okular. (I also restarted Alpine.) What am I missing?

2
  • You can investigate by running Alpine under strace, which should tell you what configuration files it reads. It may invoke some other program to do the job; use strace -f to get a trace for subprocesses as well. Commented Oct 30, 2014 at 23:15
  • Alpine usually uses the default pdf viewer of the system. So if Evince is the default, it is a good idea to uninstall then reinstall Alpine. Hope this helps.
    – Name
    Commented Nov 1, 2014 at 10:08

2 Answers 2

3

Sounds like it's ignoring the per-user settings. You can change the systemwide setting by editing /etc/mailcap.order, the syntax is fairly simple:

first-choice-app-name:mime-type
second-choice-app-name:mime-type
...

So you'd probably put:

evince-previewer:application/pdf
evince:application/pdf

(evince-previewer is fairly new, may not exist in Wheezy, but having it there is harmless).

Then you run /usr/sbin/update-mime to update /etc/mailcap.

2

Alpine reads per-user "mailcap" settings from ~/.mailcap, which overrides the systemwide /etc/mailcap. So just put the following line in ~/.mailcap:

application/pdf; evince %s
1
  • Works well and doesn't require super user clearance.
    – Vorac
    Commented Oct 8, 2018 at 14:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .