4

I always get text/plain or application/octet-stream when running "mimetype" on all file types.

The command "file --mime-type" seems to identify correctly the different file types. For instance, if I run it on a PDF file, I get

filename.pdf: application/pdf

But if I try to run "mimetype" on the same PDF file, I get

filename.pdf: text/plain

Similarly, if I run "file --mime-type" on a mp3 file, I get

filename.mp3: audio/mpeg

But if I try to run "mimetype" on the same mp3 file, I get

filename.mp3: application/octet-stream

As a consequence, I cannot open some files with the suitable application. For example. I cannot open a PDF file with evince. And I cannot set the "Open with" option of Nautilus to open each file-format with the suitable application.

I have tried to run sudo update-mime-database /usr/share/mime but it does not fix the problem.

I have noticed that, if I run "mimetype" as the first user, I get this message

WARNING: You don't seem to have a mime-info database. The shared-mime-info package is available from http://freedesktop.org/

However the shared-mime-info package seems to be correctly installed.

1
  • 1
    Have you tried reinstalling shared-mime-info? You can do so with sudo apt-get install --reinstall shared-mime-info. – Glutanimate Jun 22 '14 at 12:44
2

The problem was solved reinstalling the shared-mime-info package, as suggested by Glutanimate, with

sudo apt-get install --reinstall shared-mime-info

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.