Page 1 of 1

Firefox Plugins

PostPosted: Sat Apr 02, 2011 8:54 am
by Terry
It appears that there are several directories for plugins: ~/.mozilla/plugins/ ~/.firefox/plugins/ /usr/lib/mozilla/plugins/ /usr/lib/firefox/plugins/
So my question is; In what order does firefox search for any particular plugin?
What I ASSUME is that firefox first searches ~/.firefox/plugins/ then ~/.mozilla/plugins/ then /usr/lib/firefox/plugins/ then /usr/lib/mozilla/plugins/ But this is ONLY an assumption. Am I right? Or not?
I know for sure is that ~/.mozilla/plugins/ comes before /usr/lib/mozilla/plugins
And the reason I know this is that I recently had an older version of libflashplayer.so in ~/.mozilla/plugins/ and had placed a newer version of it in /usr/lib/mozilla/plugins/ and firefox kept using the older version until I deleted it from ~/.mozilla/plugins/
So it looks like firefox has 4 possible directories to look in for plugins.
And I suppose there are two possible questions that arise:
1) Does firefox really search all 4 directories?
2) If firefox does in fact search all 4 directories, in what order does it search them?
(There is probably a fairly simple/easy experiment one could preform to prove and/or determine the exact order, I'm just not sure what it is...)

Re: Firefox Plugins

PostPosted: Sun Apr 03, 2011 11:02 am
by David Miller
Looking at /usr/bin/firefox, which is just a shell script we see that there is an environment variable MOZ_PLUGIN_PATH involved.

Searching on google for MOZ_PLUGIN_PATH I found this page http://plugindoc.mozdev.org/notes.html
On Unix, Mozilla and Mozilla Firefox search for browser plugins in the following locations:

* The path pointed to by environment variable MOZ_PLUGIN_PATH
* Your Mozilla plugins directory (For example, /opt/mozilla/plugins)
* ~/.mozilla/plugins (Mozilla Firefox looks here too, see Bug 172891).


If you look at the slackbuild for firefoz you can see that it actually patches the firefox script to set MOZ_PLUGIN_PATH so I imagine that different distros will set it differently.

it doesn't say which get priority but I think its reasonable to assume that the last checked place takes precendence.

Re: Firefox Plugins

PostPosted: Sun Apr 03, 2011 2:40 pm
by maczimus
I have seen them symlinked as well sometimes...