GNOME Bugzilla – Bug 407419
Epiphany 64-bit can't find 64-bit plugins
Last modified: 2007-03-16 11:14:04 UTC
The Totem plugins are installed in $(libdir)/mozilla/plugins, which on 64-bit platforms is /usr/lib64/mozilla/plugins. But epiphany only looks in $(MOZ_PREFIX)/lib/mozilla/plugins, which will be /usr/lib/mozilla/plugins, thus not finding the Totem plugins. From embed/mozilla/mozilla-embed-single.cpp static void mozilla_init_plugin_path () { const char *user_path; char *new_path; user_path = g_getenv ("MOZ_PLUGIN_PATH"); new_path = g_strconcat (user_path ? user_path : "", user_path ? ":" : "", MOZILLA_PREFIX "/lib/mozilla/plugins" ":" MOZILLA_HOME "/plugins", #ifdef HAVE_PRIVATE_PLUGINS ":" PLUGINDIR, #endif (char *) NULL); g_setenv ("MOZ_PLUGIN_PATH", new_path, TRUE); g_free (new_path); }
Created attachment 82453 [details] [review] ephy-lookup-64-bit-plugins.patch
":" MOZILLA_HOME "/plugins" + ":" MOZILLA_NATIVE_PLUGINSDIR, Should we look in the 'non-native' libdir at all? I.e. should we remove the MOZILLA_HOME"/plugins" entry?
The mozilla/firefox startup scripts on Fedora looks in both directories, without any problems (or so it seems). I'd put both in there. Only niggle is that it should only list the path once if MOZILLA_PREFIX "/lib/mozilla/plugins" and MOZILLA_NATIVE_PLUGINSDIR are the same.
Yeah, we should filter it so it's only in there once.
Created attachment 84473 [details] [review] ephy-lookup-64-bit-plugins-2.patch Untested patch. It makes sure all the added paths are unique, before adding them to the path envvar.
Created attachment 84634 [details] [review] ephy-lookup-64-bit-plugins-3.patch Fix compilation warnings. Tested, and working.
list = mozilla_init_plugin_add_unique_path (list, + g_getenv ("MOZ_PLUGIN_PATH")); MOZ_PLUGIN_PATH doesn't need to contain just one path; it could contain a colon-separated list of paths. So the subsequent calls to add_unique_path won't detect if you add the same dir again. Not sure I care about this edge-case; either commit or improve at your discretion :) [gnome-2-18 and trunk].
Created attachment 84707 [details] [review] ephy-lookup-64-bit-plugins-4.patch Allow MOZ_PLUGIN_PATH to be a colon separated path.
Committed to gnome-2-18 and trunk. 2007-03-16 Bastien Nocera <hadess@hadess.net> * embed/mozilla/Makefile.am: * embed/mozilla/mozilla-embed-single.cpp: Fix Epiphany not finding some Gecko plugins when running in a multilib environment (Closes: #407419)