Code Yarns ‍👨‍💻
Tech BlogPersonal Blog

Unknown media type in type warnings in Ubuntu

📅 2015-Oct-12 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ mime ⬩ 📚 Archive

Problem

Whenever I install or remove a package in Ubuntu, I get warnings about certain MIME types:

Processing triggers for shared-mime-info (1.2-0ubuntu3) ...
Unknown media type in type 'all/all'
Unknown media type in type 'all/allfiles'
Unknown media type in type 'uri/mms'
Unknown media type in type 'uri/mmst'
Unknown media type in type 'uri/mmsu'
Unknown media type in type 'uri/pnm'
Unknown media type in type 'uri/rtspt'
Unknown media type in type 'uri/rtspu'

Solution

These are the so-called fake MIME types and come from the file /usr/share/mime/packages/kde.xml which is installed by the kdelibs5-data package. Every time a package is installed or removed, the MIME database is updated and it complains about these unknown MIME types. This is a bug from 2008 that is still not fixed, as seen here.

To fix this problem:

$ sudoedit /usr/share/mime/packages/kde.xml
$ sudo update-mime-database /usr/share/mime/

Note: Some online solutions ask you to delete the above file. If you do that, KDE applications will complain that they cannot open certain file types. For example, Okular will complain that it cannot open its own archive file and throw this error:

okular(22776)/okular (app) Okular::Document::openDocument: No plugin for mimetype '"application/zip"'.

Tried with: Ubuntu 14.04


© 2022 Ashwin Nanjappa • All writing under CC BY-SA license • 🐘 @codeyarns@hachyderm.io📧