Re: evince unable to open pdf
- To: firstname.lastname@example.org
- Subject: Re: evince unable to open pdf
- From: Florian Kulzer <email@example.com>
- Date: Wed, 29 Aug 2007 15:43:25 +0200
- Message-id: <20070829134324.GA3490@localhost>
- Mail-followup-to: firstname.lastname@example.org
- In-reply-to: <20070829120909.GA6361@titan.hooton>
- References: <20070828142327.GA7765@titan.hooton> <20070829080307.GB6192@localhost> <20070829120909.GA6361@titan.hooton>
On Wed, Aug 29, 2007 at 12:09:09 +0000, Douglas A. Tutty wrote:
> On Wed, Aug 29, 2007 at 10:03:07AM +0200, Florian Kulzer wrote:
> > On Tue, Aug 28, 2007 at 14:23:27 +0000, Douglas A. Tutty wrote:
> > > Evince itself opens OK, but when I open the file dialog with its default
> > > filter of "All Documents", it doesn't see any. If I remove the filter
> > > to "All Files", it sees the pdfs but when I select one to open, it pops
> > > up an error:
> > >
> > > Unable to open document
> > > Unhandled MIME type 'application/octet-stream'
> > As far as I understand the MIME-handling business, you need
> > /etc/mime.types (package mime-support) and/or /etc/mime-magic
> > (gnome-libs-data) to ensure identification of the MIME type
> > "application/pdf" (based on the "%PDF-" string at the start of the
> > file).
> > If you have these packages installed and it does not work then you might
> > additionally need gnome-mime-data or shared-mime-info. (This is just a
> > guess, though, based on the package descriptions.)
> Thanks Florian.
> I have everything except gnome-libs-data (since it brings in all the
> rest of gnome including gnome-bin).
I just ran strace on evince and opened a PDF file. The only "magic"
files which evince tried to access were ~/.local/share/mime/magic and
/usr/local/share/mime/magic (neither of which is present on my system).
Maybe you can generate one of these two files to make evince recognize
the PDFs. I have no idea about the required format, therefore I would
simply try to use what I see in /usr/share/mime/magic:
$ grep -aA1 pdf /usr/share/mime/magic
There are two non-printing bytes hidden in grep's output above, between
the "=" and the "%" sign in the second line:
$ grep -aA1 pdf /usr/share/mime/magic | hd -C
00000000 5b 36 30 3a 61 70 70 6c 69 63 61 74 69 6f 6e 2f |[60:application/|
00000010 70 64 66 5d 0a 3e 30 3d 00 05 25 50 44 46 2d 0a |pdf].>0=..%PDF-.|
> If I have to install the whole GNOME DTE just to use Evince, I chalk it
> up to typical Gnome stupidity and scrapt the whole thing.
> The thing is, my installed packages are exactly the same as before I
> reinstalled. The only difference is that 4.0r1 came out while I was in
> the midst of the multi-day downloading (dialup) so some of the packages
> will be newer versions.
Does it help if you run update-mime or update-mime-database manually?
Regards, | http://users.icfo.es/Florian.Kulzer