After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 554563 - can't open pdf when shared-mime-info is not installed
can't open pdf when shared-mime-info is not installed
Status: RESOLVED NOTABUG
Product: evince
Classification: Core
Component: general
2.24.x
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-10-01 13:05 UTC by Sebastien Bacher
Modified: 2017-07-19 16:00 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24



Description Sebastien Bacher 2008-10-01 13:05:59 UTC
the bug has been described on https://bugs.edge.launchpad.net/ubuntu/+source/evince/+bug/208729

"On Ubuntu Hardy Beta Server Edition and Ubuntu 8.04.1, evince-gtk cannot open any pdf files.
The error message it gives:
Unable to open document
Unhandled MIME type: “application/octet-stream”

After installing shared-mime-info package the problem disappears."

When the mimetype informations are not available evince should probably use the filename to determine the mimetype rather than displaying an error
Comment 1 Carlos Garcia Campos 2008-10-04 16:15:22 UTC
We are using g_file_query_info and g_content_type_guess from gio, so I think this is a gio issue. 
Comment 2 Matthias Clasen 2008-10-04 17:44:10 UTC
Not a bug. We have to get mime information from somewhere...
it is a distribution bug if the glib package doesn't requires shared-mime-info
Comment 3 Loïc Minier 2008-10-06 06:59:10 UTC
Right, I agree that glib needs to get the data from somewhere; it's unfortunate that we're pulling this relatively large dep now.  It's quite hard to tell whether an app linked to glib will use shared-mime-info data, so we have to pull it in all cases.

However error handling in evince is missing a couple of things:
- result_uncertain isn't used
- evince has fallback code, but this code checks for a return value of NULL while glib returns "binary/octet-stream" when the content type can not be guessed (for instance when shared-mime-info isn't installed)

Also, I wonder whether the return value of glib should be advertized in its documentation and exposed via a define?
Comment 4 Sebastien Bacher 2009-01-07 09:53:07 UTC
there is still an evince issue there
Comment 5 Manuel 2009-07-26 17:30:16 UTC
it can't open pdf in lenny+lenny1 including w/ shared-mime-info installed

Debian Bug #518664

Solved after removed

 ~/.local/share/mime/mime.cache
Comment 6 Bastien Nocera 2017-07-19 16:00:56 UTC
I don't see anyone doing any work on this. evince, and a large number of GNOME applications handling files depend on shared-mime-info being present. It's about 2 megs installed.