On Thu, May 26, 2016 at 12:12:43PM -0700, Josh Triplett wrote: > Then evince-previewer should not register itself as the default viewer > for various file types, including PDFs. By default, opening a PDF from > mutt or another program that respects the mailcap database (as updated > by update-mime) will open that PDF in evince-previewer, rather than > evince. If evince-previewer only exists to handle print previews (which > seems consistent with its window title of "Print Preview"), then it > should not register itself as a handler for the MIME types that evince > does. > > /usr/share/applications/evince-previewer.desktop and > /usr/share/applications/evince.desktop both contain an identical > MimeType line. I don't see anything in either file that sets a > priority, so I don't see any way that an application (or update-mime) > could know to prefer one over the other.
There is not a way to specify priorities for applications using .desktop files. The FDO spec sort of has a way to specify global defaults in a /usr/share/applications/mimeapps.list file, but it doesn't have a good priority mechanism and Debian doesn't include that file anyway, leaving it up to either the desktop environment or someone using xdg-mime to set per-user defaults. I think it might be a good idea to remove the mime info from evince-previewer.desktop though. I don't see anything break when I change it to "MimeType=" and as a bonus, this removes it from some menus where it shouldn't be visible anyway.

