# Firefox and Flashplayer on DragonFlyBSD Unfortunately, a Flash plugin is not natively available for DragonFlyBSD. When you want to watch Flash sites, you must install Linux versions of Firefox and the Flash player to run under emulation. ## Installing Linux emulation layer on DragonFlyBSD First, you have to install the Linux emulation. This is described in [the DragonFly handbook](linuxemu.html). Of course, you can install a more up-to-date-package of the Suse package, like meta-pkgs/suse100. To do the next steps, you must have your Linux emulation up and running. Do the following steps as "root". ******'NOTE: You can also just install the firefox-linux package and flashplayer from pkgsrc, which is actually the preferred way.******' ## Installing Firefox You should create a subdirectory where you can put in all your Linux applications. In this Howto, it's /usr/local/linuxapps. * Create the directory for you Linux applications mkdir /usr/local/linuxapps * Download a Linux version of Firefox from http://www.mozilla.org and drop the file to /usr/local/linuxapps. * Do a . cd /usr/local/linuxapps * Extract firefox . tar xvfz firefox-*gz * A subdirectory /usr/local/linuxapps/firefox is created then. It contains a firefox "installation" * Delete the firefox installation tarball . rm firefox-*gz * Firefox is now ready to use. You can start it with . /usr/local/linuxapps/firefox/firefox * You may want to make a desktop link/shortcut ## Installing Flashplayer * Download the Linux version of the Flash player from http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version#ShockwaveFlash&promoidBIOW and drop the file to /usr/local/linuxapps. Surf to the download site with your newly installed firefox, then you'll get offered the Linux version of the Flashplayer. * Extract the install_flash_player-file here. . tar xvfz install_flash_player*gz * A subdirectory with the Flash player "installation" in it is created. Enter that flashplayer directory (for example, install_flash_player_7_linux) . cd install_flash_player_7_linux * Copy the file libflashplayer.so into your firefox/plugins directory . cp libflashplayer.so ../firefox/plugins * Copy the file flashplayer.xpt into your firefox directory . cp flashplayer.xpt ../firefox * Delete your Flashplayer installation tarball . cd .. rm install_flash_player*gz * Start Firefox now and surf to a flash site. If you don't know one, try http://autobahn.nrw.de/olsim3_1/koeln.html * Firefox will complain now about a missing plugin. Let Firefox seek for the plugin and go through the installation of the Flashplayer extension. * Now restart your Firefox browser # Alternative: Using a plugin-wrapper under a native environment . The method described here consists on using ***nspluginwrapper***, from ***pkgsrc***, with a native browser which, in theory, will perform much better if compared to a generic emulated browser. Despite the fact that Flash 9 does not seem to work properly, I managed to get Flash Player 7 working very nicely, and at the time of this writing no crashes were found. (Though: Looks like Flash 9 is performing pretty well under NetBSD, so if you are able to fix it... :-))) **Quoted from the package DESCR:** nspluginwrapper is an Open Source compatibility plugin for Netscape 4 (NPAPI) plugins. It separates the execution environment of the plugin from the browser, allowing a plugin compiled for one ABI to be used in a browser compiled for another. First you will need a web browser such as Iceweasel, Firefox, Seamonkey or derived. As an example, here, seamonkey is used. :) * Compile and install a web browser, as root: cd /usr/pkgsrc/www/seamonkey bmake install Alternatively you can search an already compiled version for DragonFlyBSD and install it with pkg_add(1) Just one hint: If you are going to compile your browser, please, use some safe CFLAGS. If something unexpected occurs after/during the build you probably will have to recompile it from zero, truste me. ;-) $ seamonkey # Execute the newly installed browser as normal user, just to check if it works as expected. * Now let's build and install the plugin-wrapper: ******'NOTE: Nowadays nspluginwrapper builds without any problems. A simple 'bmake install' should be enough to install it.******' cd /usr/pkgsrc/www/nspluginwrapper bmake extract patch * By default, nspluginwrapper fails to build properly under DragonFly, so we will have to make some small adjustments, under the package workdir (work/nspluginwrapper-0.9.91.3) edit the **configure** file with your preferred editor, and change: host_os=`uname -s | tr '[A-Z]' '[a-z]'` to: host_os='netbsd' . Altough for the reader this may seem strange the only two accepted options available for us are freebsd and netbsd, so, unless you're willing to edit the whole configure and Makefile... :) * Now, with your preferred editor, edit the **Makefile** and change: All occurrence of **-lpthread** to -pthread Example: npwrapper_LDFLAGS = $(X_LDFLAGS) -lpthread change to: npwrapper_LDFLAGS = $(X_LDFLAGS) -pthread and so on... . And you're done! Now type bmake install under the ***nspluginwrapper*** port. :) * Now, you will need the libflashsupport port installed, as it will download every linux dependency needed to make flash work properly. As root: cd /usr/pkgsrc/multimedia/libflashsupport bmake install . You shouldn't install the ns-flash port, under multimedia, as it will download the Flash 9 which, at least under SeaMonkey, didn't worked properly. However if you're going to use Firefox, it'd pretty nice to give it a try. * As an alternative, download the Flash 7 plugin from: http://fpdownload.macromedia.com/get/flashplayer/installers/archive/fp7_archive.zip and unzip it. r73/install_flash_player_7_linux_r73.tar.gz is reported to work. Extract it somewhere of your choice and run, **as normal user** : nspluginwrapper -i /path/to/your/flash7/libflashplayer.so seamonkey Remember that you need to create ~/.mozilla/plugins first as nspluginwrapper won't do this for you. It will just silent fail. . Now enjoy! :)