I always get
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
But if I try to run "mimetype" on the same PDF file, I get
Similarly, if I run "file --mime-type" on a mp3 file, I get
But if I try to run "mimetype" on the same mp3 file, I get
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.