LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   editing mime-type plugin mapping in firefox/iceweasel (https://www.linuxquestions.org/questions/linux-software-2/editing-mime-type-plugin-mapping-in-firefox-iceweasel-653109/)

andrews-mark 07-02-2008 11:00 AM

editing mime-type plugin mapping in firefox/iceweasel
 
this should not be hard ... but it has flummoxed me.

I am trying to change which plugins in firefox (iceweasel) handle which mime-type. For example, I want to tell firefox to use the mplayer plugin for avi files rather than vlc plugin.

In theory, one should be able to go to edit-->preferences-->content-->manage file types.

But this just does not work for me. On some of the computers I have tried, the specific mime-type is not listed, and there is no means to add a new mime-type. In some cases, where the mime-type is listed, you can not change the plugin assigned to it (i.e. one plugin is listed, and this can not be changed or edited).

I have downloaded a mime-edit addon for firefox, but this does not help much either. It does allow me to add and edit mime-types, but not change which plugin handles them. For example, I can easily tell it to handle a pdf with the xpdf program rather than acroread, or vice versa, but I can't tell it to handle avi with the mplayer plugin and not vlc plugin (i.e. configuring external applications is fine, configuring plugins is not).

I am not alone is this difficulty. I have found these threads:

http://www.linuxquestions.org/questi...e-type-554705/

http://www.linuxquestions.org/linux/...eweasel_Plugin

http://www.linuxquestions.org/questi...iation-526247/

The second thread suggests manually editing the "do not edit" file called ~/.mozilla/firefox/pluginreg.dat

I am happy to do this. I haven't done it yet, but I am sure it will work. However, now I am really just curious about why this process is so difficult, and whether someone has found out something that I have missed.

-mark

David the H. 07-02-2008 12:04 PM

I'll never understand why the Firefox developers removed, and refuse to reinstate, the add-mime-type function. It's caused more people more frustration than just about any other change I can think of. If they were expecting the extension developers to pick up the slack, it looks like they were mistaken. The only extensions available seem to be outdated and lack functionality.

But the biggest problem seems to be that the existing adder function never works the way it's supposed to. It should be adding new mime-types to the list whenever it encounters them, but it hardly ever seems to actually do that. (note, I don't know if anything has changed with FF3 as I haven't switched to it yet.)

Anyway, I just tried out the MIME Edit extension (not certain if it's the same one you tried) and it appears to work fairly well. I can add new mime-types easily. And while it's true that you can't configure plugins directly from the extension, when I added a new mime-type supported by mplayer (audio/x-ogg, one that wasn't in my list already) it immediately became available for editing in the manage-file-types dialog of the main preferences, and the mplayer plugin was there as an option. Indeed, it was already selected. I don't have the vlc plugin installed so I couldn't test that, but it seems likely that it would also be available if I did.

So, long story short, try using the extension to add the mime-type, but switch to the main preferences dialog to configure it.

andrews-mark 07-02-2008 02:14 PM

Thanks for the reply.
I tried the method you suggested but I was not successful. Adding a new mime type using the mime-edit addon did eventually lead to the avi mime type showing up for editing within the preferences--content--manage files. However, I could not change the plugin info. In fact, it says that avi is handled by windows media player plugin, and it was not possible to change this. Obviously, there is no windows media player on my linux machine, but I did see in about:plugins that the term "windows media player" is essentially an alias for mplayer. However, it is still vlc and not mplayer that is used for avi files.

I then even tried to edit my pluginreg.dat file. That failed too. I could easily edit it, but every time the browser re-opens it reverts back to the original version (this did not happen for the person who described this process in the lq thread I mentioned.

-m


All times are GMT -5. The time now is 12:17 PM.