Firefox Plugins

General questions regarding Linux.

Moderators: Terry, FWLUG Administrator

Firefox Plugins

Postby Terry » Sat Apr 02, 2011 8:54 am

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...)
Registered Linux User 188099
<><
User avatar
Terry
 
Posts: 86
Joined: Sat Feb 10, 2007 4:01 pm

Re: Firefox Plugins

Postby David Miller » Sun Apr 03, 2011 11:02 am

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.
David Miller
 

Re: Firefox Plugins

Postby maczimus » Sun Apr 03, 2011 2:40 pm

I have seen them symlinked as well sometimes...
User avatar
maczimus
 
Posts: 101
Joined: Fri Jul 06, 2007 8:40 pm
Location: Fort Worth


Return to FWLUG General Discussions

Who is online

Users browsing this forum: No registered users and 4 guests

cron