Put in remaining pages and wiki contents.
[ikiwiki.git] / docs / howtos / HowToFirefoxandFlashplayer.mdwn
1
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.
4
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".
7
8 ******'NOTE: You can also just install the firefox-linux package and flashplayer from pkgsrc, which is actually the preferred way.******'
9
10 ## Installing Firefox 
11 You should create a subdirectory where you can put in all your Linux applications. In this Howto, it's /usr/local/linuxapps.
12
13
14 * Create the directory for you Linux applications
15        mkdir /usr/local/linuxapps
16     
17 * Download a Linux version of Firefox from http://www.mozilla.org and drop the file to /usr/local/linuxapps.
18     
19 * Do a
20       . cd /usr/local/linuxapps
21     
22 * Extract firefox
23       . tar xvfz firefox-*gz
24     
25 * A subdirectory /usr/local/linuxapps/firefox is created then. It contains a firefox "installation"
26     
27 * Delete the firefox installation tarball
28       . rm firefox-*gz
29     
30 * Firefox is now ready to use. You can start it with
31       . /usr/local/linuxapps/firefox/firefox
32     
33 * You may want to make a desktop link/shortcut
34     
35     ## Installing Flashplayer 
36     
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.
38     
39 * Extract the install_flash_player-file here.
40       . tar xvfz install_flash_player*gz
41     
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
44     
45 * Copy the file libflashplayer.so into your firefox/plugins directory
46       . cp libflashplayer.so ../firefox/plugins
47     
48 * Copy the file flashplayer.xpt into your firefox directory
49       . cp flashplayer.xpt ../firefox
50     
51 * Delete your Flashplayer installation tarball
52           . 
53     cd ..
54 rm install_flash_player*gz
55
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
57
58 * Firefox will complain now about a missing plugin. Let Firefox seek for the plugin and go through the installation of the Flashplayer extension.
59
60 * Now restart your Firefox browser
61
62 # Alternative: Using a plugin-wrapper under a native environment 
63  . 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... :-)))
64
65  **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.
66
67  First you will need a web browser such as Iceweasel, Firefox, Seamonkey or derived. As an example, here, seamonkey is used. :)
68
69
70 * Compile and install a web browser, as root:
71      
72     cd /usr/pkgsrc/www/seamonkey
73 bmake install
74  Alternatively you can search an already compiled version for DragonFlyBSD and install it with pkg_add(1)
75      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.
76     
77 * Now let's build and install the plugin-wrapper:
78     ******'NOTE: Nowadays nspluginwrapper builds without any problems. A simple 'bmake install' should be enough to install it.******'
79          
80     cd /usr/pkgsrc/www/nspluginwrapper
81 bmake extract patch
82
83 * 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:
84      
85     host_os=`uname -s | tr '[A-Z]' '[a-z]'`
86     to:
87 host_os='netbsd'
88  . 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... :)
89
90 * Now, with your preferred editor, edit the  **Makefile**  and change:
91      
92     All occurrence of  **-lpthread**  to -pthread
93      Example:  npwrapper_LDFLAGS = $(X_LDFLAGS) -lpthread
94     change to:
95      npwrapper_LDFLAGS = $(X_LDFLAGS) -pthread
96 and so on...
97  . And you're done! Now type bmake install under the ***nspluginwrapper*** port. :)
98
99 * Now, you will need the libflashsupport port installed, as it will download every linux dependency needed to make flash work properly. As root:
100      
101     cd /usr/pkgsrc/multimedia/libflashsupport
102 bmake install
103  . 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.
104
105 * As an alternative, download the Flash 7 plugin from:
106  http://fpdownload.macromedia.com/get/flashplayer/installers/archive/fp7_archive.zip and unzip it.
107  r73/install_flash_player_7_linux_r73.tar.gz is reported to work.
108  Extract it somewhere of your choice and run,  **as normal user** :
109      
110     nspluginwrapper -i /path/to/your/flash7/libflashplayer.so
111 seamonkey
112  Remember that you need to create ~/.mozilla/plugins first as nspluginwrapper won't do this for you. It will just silent fail.
113  . Now enjoy! :)