How to install Adobe FlashPlayer Firefox browser plugin on FreeBSD 7.2 and higher

Install linux_base FreeBSD port either using binary pre-compiled one or compiling via port tree.

1. Install and set up linux_base to load on FreeBSD boot


freebsd# pkg_add -vr linux_base
Opening BINARY mode data connection for linux_base.tbz (31858826 bytes).
Fetching ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/ports/i386/packages-7.2-release/Latest/linux_base.tbz...^CSignal 2 received, cleaning up..

Or via port tree with cmd:


cd /usr/ports/emulators/linux_base-f10 && make install clean

Next add linprocfs to /etc/fstab:


freebsd# echo 'linproc /compat/linux/proc linprocfs rw 0 0' >> /etc/fstab

Mount linproc virtual filesystem:


freebsd# mount -a

2. Set linux_base to auto load on startup via /etc/rc.conf


echo 'linux_enable="YES"' >> /etc/rc.conf

3. Install other libraries on which ndislpuginwrapper and flash player depend

For me it was necessery to install linux-pango and linux-tiff, which were missing. For other people it is likely other packages on which flash pluguin and ndispluginwrapper is dependent to be missing. If that’s your case just install the required ones pkg_add-ing them :)


pkg_add -vr linux-pango
....
pkg_add -vr linux-tiff
....

4. Start ABI emulation and set sysctl linux variables

Make sure ABI Linux Binaries is enabled and sysctl variables for the emulated Linux kernel (via fbsd external module) are started:


freebsd# /etc/rc.d/abi start
Additional ABI support: linux.
freebsd# /etc/rc.d/sysctl start
kern.maxfiles: 50000 -> 65535
kern.maxfilesperproc: 50000 -> 12000
kern.maxfilesperproc: 12000 -> 50000
kern.maxfiles: 65535 -> 50000

5. Set some shell and sysctl variables before installing ndiswrapper and flash player

Export OVERRIDE_LINUX_BASE_PORT and OVERRIDE_LINUX_NONBASE_PORTS shell variables before installing the respective flash player. I install flash player 10 which is relatively stable on FBSD for newer flash plugins, change the var to whatever FP version.


freebsd# setenv OVERRIDE_LINUX_BASE_PORT f10
freebsd# setenv OVERRIDE_LINUX_NONBASE_PORTS f10

It is also needed to set compat.linux.osrelease=2.6.19 sysctl variable.


freebsd# sysctl compat.linux.osrelease=2.6.19

6. Install from ports ndispluginwrapper and flashplugin 10

Now installing the Flashplayer is done via flash plugin port and nspluginwrapper:


freebsd# cd /usr/ports/www/linux-f10-flashplugin10 && make install clean
....
freebsd# cd /usr/ports/www/nspluginwrapper && make install clean
....

BTW, nspluginwrapper is required because the flash player is not natively compiled to run on FreeBSD but a Linux binary.

It is also good idea to add OVERRIDE_LINUX_BASE_PORT=f10, OVERRIDE_LINUX_NONBASE_PORTS=f10 to /etc/make.conf to make the settings permanent:


freebsd# echo 'OVERRIDE_LINUX_BASE_PORT=f10' >> /etc/make.conf
freebsd# echo 'OVERRIDE_LINUX_NONBASE_PORTS=f10' >> /etc/make.conf

7. Adding Firefox, Opera flash plugin support for users

If after installing flash plugin and restarting GNOME in a certain user still t

Share this on

Comments are closed.