Linux MIME filetypes
From Birnam Designs Wiki
You can add MIME filetypes to linux by adding files into the ~/.local/share/mime/packages or /usr/local/share/mime/packages (for system-wide mime types). The structure looks like:
<?xml version="1.0" encoding="UTF-8"?> <mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> <mime-type type="text/actionscript"> <sub-class-of type="text/plain"/> <comment>Actionscript Source Code</comment> <glob pattern="*.as"/> <glob pattern="*.as2"/> <glob pattern="*.as3"/> </mime-type> </mime-info>
(details on spec here)
Afterward you need to update your mime database with:
update-mime-database ~/.local/share/mime
or
sudo update-mime-database /usr/local/share/mime