<div dir="ltr">Thanks for this explanation. Unfortunately, I still can't find any place that's specifying ebook-viewer (or any PDF viewer, for that matter) among the various files you listed (none of which I've modified myself).<div><br></div><div>I purged calibre and tried the print preview again. Oddly, gimp still did not use mupdf, it used itself: it popped up the "import pdf" dialog for the pdf it was going to print, and opened a new (gimp) window for it.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 1, 2022 at 5:22 AM Simon McVittie <<a href="mailto:smcv@debian.org">smcv@debian.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Mon, 31 Jan 2022 at 18:36:11 -0500, Eric Cooper wrote:<br>
> I have both mupdf and calibre installed. When I choose File > Print,<br>
> and then Print Preview, gimp launches the ebook-viewer program from<br>
> calibre rather than mupdf, which appears before ebook-viewer in<br>
> /etc/mailcap (if that matters).<br>
<br>
The command used for print previews in GTK 2 comes from your GTK theme<br>
(for historical reasons) or from gtkrc (several locations are searched,<br>
~/.gtkrc-2.0 is the highest-priority).<br>
<br>
Neither ebook-viewer nor mupdf is hard-coded anywhere in GTK or GIMP.<br>
The only hard-coded command related to print previews is GNOME's evince,<br>
which is used as a default if nothing else is configured.<br>
<br>
Rather than /etc/mailcap, it is more likely that the print preview is<br>
using your configured default PDF viewer according to this <a href="http://freedesktop.org" rel="noreferrer" target="_blank">freedesktop.org</a><br>
specification:<br>
<a href="https://specifications.freedesktop.org/mime-apps-spec/latest/" rel="noreferrer" target="_blank">https://specifications.freedesktop.org/mime-apps-spec/latest/</a><br>
<br>
You can configure the preferred PDF viewer for each user via<br>
~/.config/mimeapps.list, or system-wide via /etc/xdg/mimeapps.list.<br>
<br>
In a well-integrated desktop environment, defaults for several commonly-used<br>
applications are in /usr/share/applications/DESKTOP-mimeapps.list, where<br>
DESKTOP is the value of $XDG_CURRENT_DESKTOP transformed to lower-case.<br>
For example, the GNOME desktop environment uses XDG_CURRENT_DESKTOP=GNOME,<br>
and installs /usr/share/applications/gnome-mimeapps.list via the<br>
gnome-session-common package.<br>
<br>
/etc/mailcap is no longer used by most libraries and applications. It's<br>
generated from <a href="http://freedesktop.org" rel="noreferrer" target="_blank">freedesktop.org</a> .desktop files by the update-mime command<br>
for compatibility with libraries and applications that still use it,<br>
but for historical reasons it has its own preference order.<br>
<br>
    smcv<br>
</blockquote></div>