djvulibre mimetype definition is incorrect and not needed

Bug #1833498 reported by Tigran Aivazian
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
djvulibre (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

Every time I upgrade evince (as part of "sudo apt update; sudo apt upgrade") I have to remember to edit the file /usr/lib/x86_64-linux-gnu/evince/4/backends/djvudocument.evince-backend and add "image/vnd.djvu" to the end of MimeType list. If I don't do this then evince is unable to view djvu files. Please add "image/vnd.djvu" to MimeType in the official version of this file so that I (and presumably all other millions of Ubuntu Linux users, who are too lazy to open a bugreport for it) don't have to edit it manually. Thank you.

description: updated
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. What version of Ubuntu are you using? How does it fail to open the files is it just that nautilus doesn't list is as an option? Can you add a file ewample to the bug?

Changed in evince (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Tigran Aivazian (aivazian-tigran) wrote :

Oh sorry, I forgot to include the info you requested. I am using Ubuntu Linux 18.04.2 and I don't use "nautilus". I always open djvu files using the command "evince filename,djvu" from within terminal. Well, sometimes I use "djview filename.djvu" (when I want to find out the resolution), but normally evince is more convenient.

I thought this bug is well-known because for about a year (or maybe longer) I saw it mentioned on stackexchange and that is where I learned about the workaround of adding "image/vnd.djvu" to the end of MimeTypes in the file /usr/lib/x86_64-linux-gnu/evince/4/backends/djvudocument.evince-backend.

As for the file example --- just get ANY djvu file from anywhere you like, e.g. from my website:
http://www.bibles.org.uk/guardian-plates.html Of course it fails not only with the files produced by myself, but with any other djvu files. The error message from evince is always "File type DjVu image (image/vnd.djvu) is not supported".

Revision history for this message
Tigran Aivazian (aivazian-tigran) wrote :

Oops, typo in the previous comment: I wrote "evince filename,djvu" but of course I meant "evince filename.djvu", i.e. with dot "." rather than comma ",".

Revision history for this message
Tigran Aivazian (aivazian-tigran) wrote :
Revision history for this message
Tigran Aivazian (aivazian-tigran) wrote :

Also, here is some useful info for you:

$ apt list --installed | grep djvu

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

djvubind/bionic,bionic,now 1.2.1-5 all [installed]
djvulibre-bin/bionic,now 3.5.27.1-8 amd64 [installed,automatic]
djvulibre-desktop/bionic,bionic,now 3.5.27.1-8 all [installed,automatic]
libdjvulibre-text/bionic,bionic,now 3.5.27.1-8 all [installed]
libdjvulibre21/bionic,now 3.5.27.1-8 amd64 [installed]
libminidjvu0/bionic,now 0.8.svn.2010.05.06+dfsg-5build1 amd64 [installed,automatic]
minidjvu/bionic,now 0.8.svn.2010.05.06+dfsg-5build1 amd64 [installed,automatic]
pdf2djvu/bionic,now 0.9.8-0ubuntu1 amd64 [installed,automatic]

And, following the suggestion on bugs.debian.org I have uninstalled the package djvulibre-desktop and this solved the problem, i.e. evince can open djvu files without the "image/vnd.djvu" at the end of MimeTypes in /usr/lib/x86_64-linux-gnu/evince/4/backends/djvudocument.evince-backend file.

Revision history for this message
Tigran Aivazian (aivazian-tigran) wrote :

UPDATE: No, removing djvulibre-desktop solved the problem only for the _multipage_ DjVu files, but not for the single-page ones. So, for a single-page djvu files I still get the above-mentioned error message, unless I manually add "image/vnd.djvu" to the end of MimeTypes in /usr/lib/x86_64-linux-gnu/evince/4/backends/djvudocument.evince-backend file.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks, that confirms what was mentioned on the external pages you references, djvulibre-desktop is buggy/shipping a defintion that conflicts with the standard one, which is the main issue

The single page case not working is because evince upstream decided those would be better opened as image than document, also according to them the single page format is old and deprecated, see https://bugzilla.gnome.org/show_bug.cgi?id=786511

Reassigning to djvulibre, the real issue is the first one

affects: evince (Ubuntu) → djvulibre (Ubuntu)
Changed in djvulibre (Ubuntu):
status: Incomplete → New
summary: - Upgrading evince always breaks djvu support
+ djvulibre mimetype definition is incorrect and not needed
Revision history for this message
Tigran Aivazian (aivazian-tigran) wrote :

The single-page format is not old or deprecated because that is what is created by the current versions of c44/cjb2 utilities and there is no way to change it. So, if your document happens to consist of a single page, then what you get is a single page djvu. In fact, even if you explicitly use the "multipage document manipulation utility" djvm -c testm.djvu test.djvu, then the resulting file testm.djvu will be absolutely identical to the original single page test.djvu. Therefore, it is a serious mistake to consider single-page djvu documents as "obsolete", as this breaks the functionality with no known workaround (other than manually editing the evince-backend file). And djview correctly handles both single and multipage djvu files, so evince should do as well.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in djvulibre (Ubuntu):
status: New → Confirmed
Revision history for this message
Nathaniel Beaver (nathanielmbeaver) wrote :
Revision history for this message
Tigran Aivazian (aivazian-tigran) wrote :

The link to https://bugzilla.gnome.org/show_bug.cgi?id=786511 doesn't allow leaving comments because no account can be created in this system (called "bugzilla" or something --- I vaguely remember maybe 15-20 years ago it was working, but now it doesn't). I tried to create an account in order to leave the comment pointing out the error in their decision to not support single-page djvu files.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.