/unknown-mime

An admin task to fix 'Unknown media type' messages in *nix mime database.

Primary LanguageRubyGNU General Public License v2.0GPL-2.0

unknown mime

unknown mime

Photo by jyjou

Build StatusDependency Status

unknown mime is a simple ruby admin script to fix the Unknown media type in type 'xxx/xxx' messages seen when running Linux package updates or the update-mime-database command. This script simply cleans all 'fake' mimetypes. If the messages reappear, simply run this script again.

Usage

Just run 'sudo rake' and enter the root password.

NOTE: For security purposes, it is always wise to review what a piece of code does BEFORE running it with superuser privileges. Examine mime.rb and Rakefile to see that no malicious commands are run.

I was able to reproduce these errors for testing purposes by running:

sudo aptitude reinstall kdelibs-bin kdelibs5-data kdelibs5-plugins

To reconfigure the script for actual system modification, just comment/uncomment the lines in mime.rb that alternate between the script's local directory and /usr/share/mime/packages/kde.xml

Gratitude

Credit for this fix goes to http://www.garyshood.com/unknownmedia/