From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: setting default pdf viewer Date: Sun, 11 Mar 2012 22:50:19 -0400 Message-ID: <21581.1331520619@alphaville> References: <87399fmuq4.fsf@psinom.home> <20989.1331513411@alphaville> <87k42qeg0z.fsf@psinom.home> Reply-To: nicholas.dokos@hp.com Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50020) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S6vL7-0000i6-Vq for emacs-orgmode@gnu.org; Sun, 11 Mar 2012 22:50:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S6vL5-0005O4-U7 for emacs-orgmode@gnu.org; Sun, 11 Mar 2012 22:50:25 -0400 Received: from g1t0027.austin.hp.com ([15.216.28.34]:28658) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S6vL5-0005Nj-NH for emacs-orgmode@gnu.org; Sun, 11 Mar 2012 22:50:23 -0400 In-Reply-To: Message from prad of "Sun, 11 Mar 2012 18:58:52 PDT." <87k42qeg0z.fsf@psinom.home> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: prad Cc: nicholas.dokos@hp.com, emacs-orgmode@gnu.org prad 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?