[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] setting default pdf viewer
From: |
Nick Dokos |
Subject: |
Re: [O] setting default pdf viewer |
Date: |
Sun, 11 Mar 2012 22:50:19 -0400 |
prad <address@hidden> wrote:
> here's what i found in /etc/mailcap
>
> application/pdf; /usr/bin/xpdf '%s'; test=test "$DISPLAY" != "";
> description=Portable Document Format; nametemplate=%s.pdf
>
> application/x-pdf; /usr/bin/xpdf '%s'; test=test "$DISPLAY" != "";
> description=Portable Document Format; nametemplate=%s.pdf
>
> application/pdf; evince '%s'; test=test -n "$DISPLAY"; nametemplate=%s.pdf
>
> however, i'm not sure how to interpret this.
>
I'm no expert but I believe that the first entry that matches wins: for
"application/pdf" e.g. in this case, if /usr/bin/xpdf is present and
executable and the display test succeeeds, xpdf will be used. Otherwise
it's going to search further: if evince is present and the display test
succeeds, evince will be used.
You probably want to experiment by adding entries to ~/.mailcap, so that
you don't mess up the system one: entries in ~/.mailcap override. I just
have the bare minimum in mine:
application/pdf; xpdf -q %s
Next question: since xpdf is available and /etc/mailcap prefers it, why
is nautilus using evince? Doesn't it use mailcap? I guess not, although
I don't know for sure[fn:1], but it wouldn't surprise me if it did its
own thing: there are way too many cooks in this kitchen.
Nick
Footnotes:
[fn:1] as you might guess, I don't use nautilus: I have emacs - why would
I use anything else?