2 # Firefox and Flashplayer on DragonFlyBSD
3 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.
5 ## Installing Linux emulation layer on DragonFlyBSD
6 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".
8 ******'NOTE: You can also just install the firefox-linux package and flashplayer from pkgsrc, which is actually the preferred way.******'
11 You should create a subdirectory where you can put in all your Linux applications. In this Howto, it's /usr/local/linuxapps.
14 * Create the directory for you Linux applications
15 mkdir /usr/local/linuxapps
17 * Download a Linux version of Firefox from http://www.mozilla.org and drop the file to /usr/local/linuxapps.
20 . cd /usr/local/linuxapps
23 . tar xvfz firefox-*gz
25 * A subdirectory /usr/local/linuxapps/firefox is created then. It contains a firefox "installation"
27 * Delete the firefox installation tarball
30 * Firefox is now ready to use. You can start it with
31 . /usr/local/linuxapps/firefox/firefox
33 * You may want to make a desktop link/shortcut
35 ## Installing Flashplayer
37 * 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.
39 * Extract the install_flash_player-file here.
40 . tar xvfz install_flash_player*gz
42 * A subdirectory with the Flash player "installation" in it is created. Enter that flashplayer directory (for example, install_flash_player_7_linux)
43 . cd install_flash_player_7_linux
45 * Copy the file libflashplayer.so into your firefox/plugins directory
46 . cp libflashplayer.so ../firefox/plugins
48 * Copy the file flashplayer.xpt into your firefox directory
49 . cp flashplayer.xpt ../firefox
51 * Delete your Flashplayer installation tarball
54 rm install_flash_player*gz
56 * Start Firefox now and surf to a flash site. If you don't know one, try http://autobahn.nrw.de/olsim3_1/koeln.html
58 * Firefox will complain now about a missing plugin. Let Firefox seek for the plugin and go through the installation of the Flashplayer extension.
60 * Now restart your Firefox browser
62 # Alternative: Using nspluginwrapper with the native Flash plugin
64 The method described here consists on using ***nspluginwrapper***,
65 from ***pkgsrc***, with a native browser which, in theory, will
66 perform much better if compared to a generic emulated browser.
68 Procedure tested against DragonFlyBSD 2.6/i386, Firefox 3.6, and flash9
69 on the pkgsrc-2010Q1 branch.
71 **Note** : Linux emulation support on 64Bit DragonFly is not functional
72 at the time of writing - so you'll need to run 32Bit DragonFly
73 if you want this to work for now.
75 ## Step 1: Setup Linux Emulation Environment
77 Nspluginwrapper requires that the Linux emulation infrastructure is
78 in place in order to correctly deal with the linux format flash plugin.
80 ### Install linux compatibility packages and multimedia/libflashsupport
82 This installs the needed linux packages for flash support, as well as
83 installing the core linux emulation environment, and can be done as follows:
85 # cd /usr/pkgsrc/multimedia/libflashsupport
88 ### Configure DragonFlyBSD to run Linux binaries
90 In order to use Linux emulated binaries, the linux compatibility
91 layer needs a bit of setup.
93 First, load the linux emulator kernel module:
96 # kldload aac_linux # note - not 100% sure if needed here..
98 Next, mount linprocfs:
100 # mount -t linprocfs none /usr/pkg/emul/linux/proc
102 Then, run Linux ldconfig to setup the linux-side library linker paths:
104 # /compat/linux/sbin/ldconfig
106 The above steps should enable the linux emulation system to work -
107 this can be tested by running a linux command - for example:
110 DragonFly 2.6-RELEASE
111 # file /usr/bin/uname /compat/linux/bin/uname
112 /usr/bin/uname: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for DragonFly 2.0.600, stripped
113 /compat/linux/bin/uname: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, stripped
115 DragonFly 2.6-RELEASE
116 # /compat/linux/bin/uname -sr
118 # file /bin/ls /compat/linux/bin/ls
119 /bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, for DragonFly 2.0.600, stripped
120 /compat/linux/bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, stripped
121 # /bin/ls -l /compat/linux/bin/ls
122 -rwxr-xr-x 1 root wheel 82640 May 6 00:38 /compat/linux/bin/ls
123 # /compat/linux/bin/ls -l /bin/ls
124 -rwxr-xr-x 1 root wheel 82640 May 6 00:38 /bin/ls
126 This example shows the different binary formats, as well as the uname
127 and path overrides provided by the emulation layer,
128 as well as some some subtle ls formatting subtleties between the two
131 To enable linux emulation at boot, set linux_enable='YES' in your rc.conf,
132 and create an fstab entry for the proc filesystem.
134 ### Install nspluginwrapper and ns-flash
136 Now that the Linux emulation system has been configured and tested,
137 it's time to setup the actual flash portion:
139 # cd /usr/pkgsrc/www/ns-pluginwrapper
140 # bmake package clean
142 This should be all that is needed - however, during my tests, I
143 did come across some errors that were related to not having setup
144 the emulation layer properly - these errors contained something
145 like "Elf type '0' binary unknown" - which means that nspluginwrapper
146 is having trouble interfacing with the linux emulation subsystem.
148 You can check the installation with:
150 # nspluginwrapper --list
151 /usr/pkg/lib/netscape/plugins/npwrapper.libflashplayer.so
152 Original plugin: /usr/pkg/lib/netscape/plugins/libflashplayer.so
153 Wrapper version string: 1.2.2
154 /usr/pkg/lib/netscape/plugins/npwrapper.libflashplayer.so
155 Original plugin: /usr/pkg/lib/netscape/plugins/libflashplayer.so
156 Wrapper version string: 1.2.2
158 No idea why it lists the plugin twice. From there - use it!
160 * Check about:plugins in your FireFox url bar - you should see:
162 File: npwrapper.libflashplayer.so
163 Version: Shockwave Flash 9.0 r283
167 even when working, you might still recieve the following message when
170 LoadPlugin: failed to initialize shared library /usr/pkg/lib/netscape/plugin
171 s/libflashplayer.so [Shared object "libdl.so.2" not found, required by "libflash
174 which, apparently, can be ignored - as it still worked.
176 ## Audio/Video sync issues with this method
178 Untested - the following was mentioned by ahornung@ on the docs@ list
181 About this: with the libflashsupport out of pkgsrc there's an
182 audio<->video sync problem. Johannes Hofmann (jh33) has found and fixed
183 the issue, but since libflashsupport is distributed as a binary, it
184 didn't make its way into pkgsrc and might never do so.
186 He is providing a fixed version (yes, it's a trustworthy source) here:
188 http://flpsed.org/libflashsupport.so.gz
190 http://leaf.dragonflybsd.org/~hofmann/libflashsupport.so
192 ## Further testing for nspluginwrapper, trying other versions, etc
194 If you want to try out another flash version, etc - or possibly
195 for other linux-only plugins - the following steps apply and
196 were previously tested using flash7 and the seamonkey browser.
198 * download the Flash 7 plugin from:
199 http://fpdownload.macromedia.com/get/flashplayer/installers/archive/fp7_archive.zip and unzip it.
200 r73/install_flash_player_7_linux_r73.tar.gz is reported to work.
201 * Extract it somewhere of your choice and run, **as normal user** :
203 nspluginwrapper -i /path/to/your/flash7/libflashplayer.so
206 Remember that you need to create ~/.mozilla/plugins first as
207 nspluginwrapper won't do this for you. It will just silent fail.