[Bug 1778088] Re: DjVu Files cannot be opened

Gro-Tsen 1778088 at bugs.launchpad.net
Wed May 15 14:02:55 UTC 2019


Up to recently, this bug was easily fixed by removing the "djvulibre-
desktop" package, but some recent upgrade seems to have brought it back
with a vengeance (some time before but not long before 2019-05-15).

Since Ubuntu is visibly in no hurry to fix this, let me offer a
workaround: create ~/.local/share/mime/packages/override.xml with the
following content:

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
  <!-- Created on 2019-05-15 to fix a reappearance of this bug: -->
  <!-- https://bugs.launchpad.net/ubuntu/+source/djvulibre/+bug/1778088 -->
  <!-- (DjVu seen as image/vnd.djvu instead of image/vnd.djvu+multipage) -->
  <!-- https://twitter.com/gro_tsen/status/1128645721614356480 -->
  <!-- Run "update-mime-database ~/.local/share/mime" after creating this. -->
  <!-- Use "xdg-mime query filetype some-file.djvu" to test. -->
  <!-- - David A. Madore -->
  <mime-type type="image/vnd.djvu+multipage">
    <comment>DjVu image</comment>
    <alias type="image/x-djvu"/>
    <magic priority="99">
      <match value="AT&TFORM" type="string" offset="0">
        <match value="DJVU" type="string" offset="12"/>
      </match>
      <match value="FORM" type="string" offset="0">
        <match value="DJVU" type="string" offset="8"/>
      </match>
    </magic>
    <glob pattern="*.djvu"/>
    <glob pattern="*.djv"/>
  </mime-type>
</mime-info>

— and then run “update-mime-database ~/.local/share/mime” to regenerate
the local MIME cache.

See also https://twitter.com/gro_tsen/status/1128645721614356480 and
https://gist.github.com/Gro-Tsen/2961f34df4a29d143c7b3499fac7e130

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to djvulibre in Ubuntu.
https://bugs.launchpad.net/bugs/1778088

Title:
  DjVu Files cannot be opened

Status in djvulibre package in Ubuntu:
  Confirmed

Bug description:
  When trying to open a .djvu document, evince shows an error:

    File type DjVu image (image/vnd.djvu) is not supported

  Apparently, upstream has removed the image/vnd.djvu mimetype in an
  effort to treat single-page .djvu files more like images
  (https://bugzilla.gnome.org/show_bug.cgi?id=754467). The file in
  question is however a multi-page, yet the mime-type is not the
  expected "image/vnd.djvu+multipage":

    $ file book.djvu
    book.djvu: DjVu multiple page document
    $ file --mime-type book.djvu
    book.djvu: image/vnd.djvu

  This happens on all bionic machines I have access to.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/djvulibre/+bug/1778088/+subscriptions



More information about the foundations-bugs mailing list