From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: setting default pdf viewer Date: Mon, 12 Mar 2012 13:06:22 +0800 Message-ID: <87mx7m76i9.fsf@ericabrahamsen.net> References: <87399fmuq4.fsf@psinom.home> <20989.1331513411@alphaville> <87k42qeg0z.fsf@psinom.home> <21581.1331520619@alphaville> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:38570) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S6xSu-0006fZ-Dt for emacs-orgmode@gnu.org; Mon, 12 Mar 2012 01:06:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S6xSs-0002mg-CU for emacs-orgmode@gnu.org; Mon, 12 Mar 2012 01:06:35 -0400 Received: from plane.gmane.org ([80.91.229.3]:50552) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S6xSs-0002mY-5O for emacs-orgmode@gnu.org; Mon, 12 Mar 2012 01:06:34 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1S6xSp-0003jT-No for emacs-orgmode@gnu.org; Mon, 12 Mar 2012 06:06:31 +0100 Received: from 114.252.250.160 ([114.252.250.160]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 12 Mar 2012 06:06:31 +0100 Received: from eric by 114.252.250.160 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 12 Mar 2012 06:06:31 +0100 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: emacs-orgmode@gnu.org On Mon, Mar 12 2012, Nick Dokos wrote: > 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. I think most linux desktop environments use something like xdg-open or gnome-open to determine defaults applications, all my defaults seem to live in /usr/local/share/applications, which can be overridden in the home directory. Nautilus ought to use gnome-open. I've tweaked most of my "open-in-external-blah" functions (in dired and gnus, for example) to use xdg-open, so the same defaults are used in all my applications, including emacs. -- GNU Emacs 24.0.94.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-03-06 on pellet Org-mode version 7.8.03 (release_7.8.03.573.g86131)