Flash Plugin on FreeBSD

Problem to solve

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

Update

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.

Solution

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.  
  2. root#cd /usr/src
  3. root#patch -p0 < rtld_dlsym_hack.diff
  4. root#cd libexec/rtld-elf/
  5. root#make && make install
  6.  

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

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

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.  
  2. root#cd /usr/ports/www/linuxpluginwrapper/ && make install clean
  3.  

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

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

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

(this is my first tutorial post so be gentle with the comments :) )

Tags:, , , , , ,

Related:

Topics: FreeBSD


  1. Dante ROMANIA Linux Mozilla Firefox 1.5.0.4 October 19th, 2006 at 1:31 pm

    Works under FreeBSD 7-current two

  2. eti ROMANIA FreeBSD Mozilla Firefox 1.5.0.7 October 22nd, 2006 at 4:07 pm

    If the dependency on linux-base is removed from linux-flashplugin ( the dependency is not needed )  the it souled be enough to just install the port as usually and not manually extract the files.

  3. Rixk NETHERLANDS FreeBSD Konqueror 3.5 October 22nd, 2006 at 7:37 pm

    First of all, the plugins directory seems to be /usr/X11R6/lib/firefox/plugins instead of /usr/local/lib.

    Firefox/mozilla crash (both native and linux versions) when loading a flash object
    I get this error when visiting a Flash site:

    The program ‘Gecko’ received an X Window System error.
    This probably reflects a bug in the program.
    The error was ‘BadMatch (invalid parameter attributes)’.
    (Details: serial 84 error_code 8 request_code 145 minor_code 3)
    (Note to programmers: normally, X errors are reported asynchronously;
    that is, you will receive the error a while after causing it.
    To debug your program, run it with the –sync command line
    option to change this behavior. You can then get a meaningful
    backtrace from your debugger if you break on the gdk_x_error() function.)

  4. eti ROMANIA FreeBSD Mozilla Firefox 1.5.0.7 October 22nd, 2006 at 7:51 pm

    Hi Rixk

    The pugins directory was /usr/X11R6/lib until a recent update ( about 1 week ago ) when it was moved to /usr/local/lib ( see recent /usr/ports/UPDATING )

    I have never seen your error so there is not much i can say about it. I’ve seen older firefox crash with older linux plugin versions … so if it’s an option try updating to more recent src / ports .

  5. eti ROMANIA Windows XP Mozilla Firefox 1.5.0.7 November 4th, 2006 at 6:43 pm

    The sound seems to be woking also on regular swf files but still does not work on flv files like the ones from youtube.com

  6. eti ROMANIA Windows XP Mozilla Firefox 1.5.0.7 November 6th, 2006 at 5:44 pm

    Flash 9 beta for linux is out.

    Now the challenge is to make it work on freebsd. I’ve manage to have native firefox load the plugin but it crashes on any flash object. The crash seems to happen in libflashplugin.so with is the binary file from adobe and does not contain debug information. I’ve tried it with libpthread and also with libthr but nothing changed.

    I’ll try installing the linux-firefox to see if the plugin works, but i don’t feel very comfortable installing the hole linux emulation layer.

    PS: Its strange that i go to all this trouble just to have the flash plugin in freebsd’s native firefox and also use the noscript extension to block flash. In the end i guess it’s just the challenge that drives me.

  7. eti ROMANIA Windows XP Mozilla Firefox 1.5.0.7 November 6th, 2006 at 6:13 pm

    On linux-firefox the plugin worked from the first shot but without sound. I was able so play an youtube movie but without sound.

  8. eti ROMANIA Windows XP Mozilla Firefox 1.5.0.7 November 6th, 2006 at 6:41 pm

    Yep… I’m watching an youtube movie WITH sound on FreeBSD using linux emulation layer, linux-firefox and linux flashplugin 9 beta and libflashsupport ( for OSS sound ). It’s not very stable ( I’m experiencing crashes on youtube ) and being linux binaries i don’t feel like installing debugging tools for them, but anyway it’s a start. To bad it’s with the linux emulation. I’ll keep trying to make the plugin work with the native firefox.

  9. eti ROMANIA Windows XP Mozilla Firefox 1.5.0.7 November 7th, 2006 at 1:12 pm

    Flash plugin on FreeBSD conclusion

    I’ve managed to get the linux flash plugin 9 beta to work with linux-firefox. It plays anything including youtube movies with sound. It’s not rock stable as it crashed a few times … but only on youtube.

    As for the native version of firefox i decided to stick with flash 7 because the flash 9 plugin even if recognized keeps crashing on any flash object without useful debugging information. It seems to crash when initializing the plugin and the crash always occurs in the same place but i have no more ideas on what to try. I’ve managed to get it recognized by the native firefox by extending linuxpluginwrapper and adding a flash9.so object that has all the flash7.so symbols and adding stdout,stderr,stdin and get_current_dir_name symbols. The flash9 plugin does not need the rtld patch.

    I have nothing against linux-firefox and the linux emulation layer, but at least for me it does not feel right to run a linux binary when i can run a native one and thinking that i don’t need flash that much I’ll keep the linux-firefox around but use the native browser for daily browsing.

  10. Daniel S UNITED STATES FreeBSD Mozilla Firefox 2.0 November 19th, 2006 at 11:53 pm

    Thanks very much for your tutorial! It works great on my FreeBSD 6.1 install and using Firefox 2.0

  11. eti ROMANIA Windows XP Mozilla Firefox 1.5.0.8 December 8th, 2006 at 1:36 pm

    I’ve just installed version 7.0r69 and works out of the box. Still waiting for updates on flash 9.

  12. Andrei ROMANIA FreeBSD Mozilla Firefox 2.0.0.1 February 18th, 2007 at 1:04 pm

    It works on 6.0 & 6.2

  13. Andrei ROMANIA Windows XP Mozilla Firefox 1.5.0.9 February 18th, 2007 at 4:31 pm

    It works on 6.0 & 6.2f

Leave a Reply