Friday, February 04, 2011

Got flash in Firefox/Midori in FreeBSD

If you've been following the thread that I linked to in my earlier post, you'll know that I've now got flash in all three browsers that I use in FreeBSD (Opera 11, Midori and Firefox).
Actually, I rarely use Firefox and only downloaded it this time as the handbook refers largely to this browser.
Essentially what I did to get it working was to:
i) remove all the links I made from /usr/compat/linux/lib to /usr/local/lib (see here for more detail)
ii) deinstalled everything associated with Firefox i.e the browser itself, nspluginwrapper, linux_base-f10 and linux-f10-flashplugin10.
Then I reinstalled everything according to the handbook (section 6.2.3).
Note that during the reinstall of nspluginwrapper, I got many error messages about linux-f10 stuff being already installed. I therefore had to deinstall all of these packages one by one, until finally nspluginwrapper installed.
iii) Even then, after completing all of the steps noted in the handbook, Firefox did not have a flash plugin and flash did not work for me. It seemed the major problem was to do with nspluginwrapper as no npwrapper.libflashplayer.so was created anywhere on my system.
I got a lot of help from this blogpost which showed what the output from the nspluginwrapper command should look like which is this:

$ sudo nspluginwrapper -v -i libflashplayer.so
Install plugin downloads/install_flash_player_9_linux/libflashplayer.so
into /usr/lib/nspluginwrapper/plugins/npwrapper.libflashplayer.so
And create symlink to plugin in /usr/lib/mozilla/plugins: done.
And create symlink to plugin in /usr/lib/firefox/plugins: done.
And create symlink to plugin in /usr/lib/iceweasel/plugins: done.

What I got the first time was this:
$ nspluginwrapper -v -a -i
Auto-install plugins from /usr/local/lib/browser_plugins
Looking for plugins in /usr/local/lib/browser_plugins
Install plugin /usr/local/lib/browser_plugins/libflashplayer.so
Auto-install plugins from /home/paul/.mozilla/plugins
Looking for plugins in /home/paul/.mozilla/plugins

where it is clear that no npwrapper.libflashplayer.so was formed and neither were any symlinks.
Next I tried a more specific command rather than the general "nspluginwrapper -v -a -i" and got the following:
nspluginwrapper -v -i /usr/local/lib/npapi/linux-f10-flashplugin/libflashplayer.so
Install plugin /usr/local/lib/npapi/linux-f10-flashplugin/libflashplayer.so
[paul@E520-FreeBS /usr/home/paul]$

Once again no wrapped flash play was produced.
Nothing for it but to try the nspluginwrapper command as root and here's what I got:
E520-FreeBS# nspluginwrapper -v -a -i
Auto-install plugins from /usr/local/lib/browser_plugins
Looking for plugins in /usr/local/lib/browser_plugins
Install plugin /usr/local/lib/browser_plugins/libflashplayer.so
into /usr/local/lib/browser_plugins/npwrapper.libflashplayer.so
Auto-install plugins from /root/.mozilla/plugins
Looking for plugins in /root/.mozilla/plugins
E520-FreeBS#

Well, at least the npwrapper.libflashplayer.so was formed but no symlinks.
So, I manually symlinked it using
# ln -s /usr/local/lib/browser_plugins/npwrapper.libflashplayer.so /usr/home/paul/.mozilla/plugins/

However, even though the link was formed in ~/.mozilla/plugins when I checked its properties it was broken. I am unable to explain this but it seems to be at the heart of my problem.
In any event, given that I can't symlink the wrapped flash player to ~/.mozilla/plugins/, I copied it. And this worked.
About:plugins in Firefox showed the flashplayer plugin and youtube worked in both Firefox and Midori.
Great but I'm not happy that things didn't go "according to the book" so I'll probably clean install the FreeBSD 8.2 Release when it comes out in a few days to eliminate whatever "infrastructural" problems my sandboxing has introduced.

No comments:

Post a Comment