From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: emacs-orgmode@gnu.org
Subject: Re: setting default pdf viewer
Date: Mon, 12 Mar 2012 13:06:22 +0800 [thread overview]
Message-ID: <87mx7m76i9.fsf@ericabrahamsen.net> (raw)
In-Reply-To: 21581.1331520619@alphaville
On Mon, Mar 12 2012, Nick Dokos wrote:
> prad <prad@towardsfreedom.com> 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)
next prev parent reply other threads:[~2012-03-12 5:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-11 8:01 setting default pdf viewer prad
2012-03-11 8:17 ` Puneeth Chaganti
2012-03-11 17:15 ` prad
2012-03-11 22:25 ` brian powell
2012-03-12 0:50 ` Nick Dokos
2012-03-12 1:58 ` prad
2012-03-12 2:50 ` Nick Dokos
2012-03-12 5:06 ` Eric Abrahamsen [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-03-13 14:16 Nick Dokos
2012-03-13 15:42 ` Eric Abrahamsen
2012-03-13 15:47 ` Nick Dokos
2012-03-13 21:32 ` Achim Gratz
2012-03-15 2:33 ` François Pinard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mx7m76i9.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.