Friday, March 20, 2009

Installing moonlight/silverlight support on an eeePC 900 with default Xandros

There is a moonlight plug-in for Firefox, which should work both with version 2.x and 3.x. It surely works under ubuntu-based distributions (like EEEbuntu), but under the standard Xandros it does not (either with Firefox 2.x or 3.x).


With Firefox 2.x (installed by default on Xandros eeePC)
The plug-in installs correctly and then Firefox restarts. Once opened a web page with a moonlight/silverlight video content, it asks for a Microsoft codec media pack. Then it downloads the pack, but after a page refresh or Firefox restart it asks again for the pack, endless.


With Firefox 3.x (installed following this how-to)
The plug-in seems correctly installed, but then when Firefox restarts, it does not crash but it stops.
Some files downloaded with the plug-in seem to be compiled against glibc version 2.4, while on the eeePC Xandros glibc is version 2.3.
I found no way to compile them against version 2.3, nor to get glibc 2.4 under Xandros, but found this page with a small tool to patch the FlashPlayer10 (which has the same problem). Thank to the author (SvOlli) the tool it's just a simple binary search and replace, and can be used with other files than the one for which was intended to.
  1. install the plug-in;
  2. download the tool;
  3. extract the flash10patcher executable somewhere, e.g. in /home/user (the file manager opens the .tar.bz2 archives);
  4. open a terminal;
  5. enter that directory and become root:
    # cd /home/user

    # sudo bash

  6. backup to that folder the library file libmoonplugin-ff3bridge.so which is in the profile folder of Firefox, under the subfolder extension/moonlight@novell.com/plugins/moonlight:
    # cp /home/user/.mozilla/firefox/some_alfanumeric_string.default/extension/moonlight@novell.com/plugins/moonlight/libmoonplugin-ff3bridge.so libmoonplugin-ff3bridge.so.original
  7. copy to that folder the same library file and rename it as libflashplayer.so:
    # cp /home/user/.mozilla/firefox/some_alfanumeric_string.default/extension/moonlight@novell.com/plugins/moonlight/libmoonplugin-ff3bridge.so /home/user/libflashplayer.so
  8. run the executable:
    # /home/user/flash10patcher
  9. rename the output like the library file and move it to its right place:
    # mv /home/user/patched.libflashplayer.so /home/user/.mozilla/firefox/some_alfanumeric_string.default/extension/moonlight@novell.com/plugins/moonlight/libmoonplugin-ff3bridge.so
  10. now the plug-in works; run it, by opening a web page with some moonlight/silverlight video content; download the codec media pack as requested;
  11. find where the pack is stored:
    # find / -name "silverlight-media*.so"
  12. backup the media pack file silverlight-media-pack-linux-x86-5-1.so just found:
    # cp /path_found/silverlight-media-pack-linux-x86-5-1.so /home/user/silverlight-media-pack-linux-x86-5-1.so.original
  13. copy the same media pack file and rename it libflashplayer.so:
    # cp /path_found/silverlight-media-pack-linux-x86-5-1.so /home/user/libflashplayer.so
  14. run the executable:
    # /home/user/flash10patcher
  15. rename the output like the media pack file and move it to the lib directory:
    # mv /home/user/patched.libflashplayer.so /usr/lib/mozilla/plugins/moonlight/silverlight-media-pack-linux-x86-5-1.so
  16. (re)start Firefox.

Now the moonlight/silverlight video content should be viewable.