GNOME Bugzilla – Bug 401079
Enable/disable mime-types/plugins using config files
Last modified: 2007-05-14 13:32:56 UTC
See: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=216280#c11 We should be able (like QuickTime allows on Windows/MacOS X) to disable certain plugins or mime-types using GConf, so that even though installed, plugins can be disabled. An example is the "Complex" plugin taking over a Real/Helix plugin installed. We should be able to disable the Complex plugin, or certain mime-types it allows. This might mean that the proper plugins would have to use GConf. Any other ways to do this without adding deps to the plugin?
I'm not sure adding a gconf dependency is the right thing here... Maybe using the gecko prefs system? Or a conf-file somewhere in ~/.config ?
(In reply to comment #1) > I'm not sure adding a gconf dependency is the right thing here... > > Maybe using the gecko prefs system? Or a conf-file somewhere in ~/.config ? The point is having admins be able to disable it system-wide. Config files don't have that ability... Maybe we could call a small helper that would depend on GConf itself?
We'd need to disable it at the Mozilla level, as otherwise the pluginreg.dat won't be updated, and the mime-type will still be registered. I still can't find how to disable a specific mime-type programmatically in a plugin.
The solution might be in nsPluginHostImpl.h, where we'd use UnMark(NS_PLUGIN_FLAG_ENABLED) on the PluginTag.
I don't have the bug ref handy right now, but there are bug(s) filed on b.m.o about that mime type caching.
Created attachment 86442 [details] [review] totem-disable-plugins.patch Disable the plugins based on a couple of key files. ---8<--- [Plugins] audio/mpeg.disabled=true video/mpeg.disabled=false ---8<--- In the system-wide .ini file (/etc/totem/browser-plugins.ini), explicitely mentioned plugins will be forcibly disabled/enabled for all users. The user can then disable specific plugins by using the same syntax in ~/.gnome2/Totem/browser-plugins.ini.
I forgot to mention that you'd need to remove your browser's pluginreg.dat for this to work...
Comment on attachment 86442 [details] [review] totem-disable-plugins.patch >Index: totemPluginGlue.cpp <snip> >+ "browser-plugins.ini" And there's a comma missing here.
Created attachment 86444 [details] [review] totem-disable-plugins.patch Fixes build
2007-05-14 Bastien Nocera <hadess@hadess.net> * README: upd * browser-plugin/Makefile.am: * browser-plugin/README: move to... * browser-plugin/README.browser-plugin: ...this file, and add details on how to disable specific mime-types * browser-plugin/totemPluginGlue.cpp: Allow to disable specific mime-types, using a .ini style file, as documented in README.browser-plugin (Closes: #401079)