Flash Plugin on FreeBSD

Problem to solve

Make a recent flash player plugin work in firefox on FreeBSD 6.


There is a new article on enabling the linux-flash7 plugin with native browsers.

With the release of FreeBSD 6.2 and the update on linuxpluginwrapper this tutorial has become obsolete. It's only recommended if you need to stick with an older version of freebsd and/or flashplugin.


First thing to do is get this patch for /usr/src/libexec/rtld-elf/rtld.c, copy it in /usr/src and do the following: (you must have the source tree in /usr/src and the version of the sources must be the same with the version of the installed world, if they are different or you are not sure it's probably best to rebuild your world ( FreeBSD world that is :) ) and kernel )

1 root#cd /usr/src
2 root#patch -p0 < rtld_dlsym_hack.diff
3 root#cd libexec/rtld-elf/
4 root#make && make install

After successfully installing the patch you need to fetch and unpack the linuxflashplayer7:

1 root#cd /usr/ports/www/linux-flashplugin7/
2 root#make fetch
3 root#cd /usr/local/lib/firefox/plugins/
4 root#tar zxvf /usr/ports/distfiles/flashplugin/7.0r68/install_flash_player_7_linux.tar.gz
5 root#cp install_flash_player_7_linux/libflashplayer.so libflashplayer.so
6 root#cp install_flash_player_7_linux/flashplayer.xpt flashplayer.xpt

Now make sure you have the plugin files ( libflashplayer.so and flashplayer.xpt ) in /usr/local/lib/firefox/plugins.You now need to install the linuxpluginwrapper:

1 root#cd /usr/ports/www/linuxpluginwrapper/ && make install clean

Finally you have to change /etc/libmap.conf:

1 [/usr/local/lib/firefox/plugins/libflashplayer.so]
2 libpthread.so.0 libpthread.so.2
3 libdl.so.2 pluginwrapper/flash7.so
4 libz.so.1 libz.so.3
5 libm.so.6 libm.so.4
6 libc.so.6 pluginwrapper/flash7.so

Now open your browser and go to about:plugins. Flash 7 plugins is active.