1 Title: How to find a browser plugin supporting a given MIME type
5 <p>Some times I try to figure out which Iceweasel browser plugin to
6 install to get support for a given MIME type. Thanks to
7 <a href="https://wiki.ubuntu.com/MozillaTeam/Plugins">specifications
8 done by Ubuntu</a> and Mozilla, it is possible to do this in Debian.
9 Unfortunately, not very many packages provide the needed meta
10 information, Anyway, here is a small script to look up all browser
11 plugin packages announcing ther MIME support using this specification:</p>
17 def pkgs_handling_mimetype(mimetype):
22 version = pkg.candidate
24 version = pkg.installed
27 record = version.record
28 if not record.has_key('Npp-MimeType'):
30 mime_types = record['Npp-MimeType'].split(',')
32 t = t.rstrip().strip()
34 thepkgs.append(pkg.name)
36 mimetype = "audio/ogg"
38 mimetype = sys.argv[1]
39 print "Browser plugin packages supporting %s:" % mimetype
40 for pkg in pkgs_handling_mimetype(mimetype):
44 <p>It can be used like this to look up a given MIME type:</p>
47 % ./apt-find-browserplug-for-mimetype
48 Browser plugin packages supporting audio/ogg:
50 % ./apt-find-browserplug-for-mimetype application/x-shockwave-flash
51 Browser plugin packages supporting application/x-shockwave-flash:
56 <p>In Ubuntu this mechanism is combined with support in the browser
57 itself to query for plugins and propose to install the needed
58 packages. It would be great if Debian supported such feature too. Is
59 anyone working on adding it?</p>
61 <p><strong>Update 2013-01-18 14:20</strong>: The Debian BTS
62 request for icweasel support for this feature is
63 <a href="http://bugs.debian.org/484010">#484010</a> from 2008 (and
64 <a href="http://bugs.debian.org/698426">#698426</a> from today). Lack
65 of manpower and wish for a different design is the reason thus feature
66 is not yet in iceweasel from Debian.</p>