Bug#908177: evince: Rename of desktop file from evince.desktop to org.gnome.Evince.desktop breaks MIME/mailcap ordering (PDFs open with gimp)

Josh Triplett josh at joshtriplett.org
Fri Sep 7 21:48:46 BST 2018


On Fri, Sep 07, 2018 at 10:07:08AM +0200, Michael Biebl wrote:
> Am 07.09.18 um 09:07 schrieb Josh Triplett:
> > On Fri, Sep 07, 2018 at 06:22:06AM +0200, Michael Biebl wrote:
> >> Am 07.09.18 um 05:49 schrieb Josh Triplett:
> >>> Package: evince
> >>> Version: 3.30.0-1
> >>> Severity: important
> >>>
> >>> evince 3.30 renamed the desktop file from evince.desktop to
> >>> org.gnome.Evince.desktop. update-mime, the tool to generate
> >>> /etc/mailcap, processes desktop files in order by name. Because of this
> >>> rename, GIMP now has a higher priority for PDF and PostScript files than
> >>> Evince does, causing mutt and similar to open PDF and PostScript files
> >>> with GIMP by default.
> >>
> >> What would you suggest should be done about this?
> >> Renaming the desktop file back to evince.desktop is not really an option.
> > 
> > I'm not proposing that (though I'm curious what makes that particularly
> > painful). We need *some* solution though. That this happened to work
> > out of the box before was effectively a coincidence based on "evince"
> > sorting before "gimp".
> > 
> > I don't know what the *ideal* solution looks like.
> > 
> > One short-term approach would be to introduce some kind of simplistic priority
> > scheme in desktop files via an X- header that update-mime reads, and
> > have evince and/or GIMP use that (and perhaps declare a Breaks for older
> > mime-support).  Effectively, this would introduce a concept of "this
> > application supports this MIME type but should never end up as the
> > primary tool a user wants to use to open it", versus "it's plausible
> > that this could be the primary tool a user uses to open this MIME type".
> > That would solve the problem of ending up with something like GIMP as
> > the primary PDF opener, though it doesn't solve the long-term issue of
> > ending up with the wrong tool for your preferred environment (e.g.
> > evince vs okular).
> 
> /etc/mailcap is very unflexible in that regard and I'm not sure it's
> fixable.

All we need is a way to control the order or priority of entries in
mailcap.

> Maybe a better solution would be if tools moved away from using
> /etc/mailcap. Could mutt be taught to use xdg-open?

Perhaps; mutt certainly seems like the most prominent remaining user of
mailcap. xdg-open wouldn't handle everything mutt uses mailcap for (it
also uses mailcap to turn some formats to text and view them inline),
but it couldn't hurt.

But meanwhile, anything depending on mailcap via mime-support (which
does currently include mutt) won't handle PDFs correctly.



More information about the pkg-gnome-maintainers mailing list