Unknown media type in type warnings in Ubuntu

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:

  • Open the above file, remove the XML entries corresponding to the above 8 MIME types and save the file:
$ sudoedit /usr/share/mime/packages/kde.xml
  • Update the MIME database:
$ 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

Advertisements

One thought on “Unknown media type in type warnings in Ubuntu

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s