pipelight-logo That is the exact title of an article which appeared on fds-team.de last august.

You may have read my earlier rant about dutch schools migrating (or forced to migrate) to a Microsoft SilverLight based learning management software called Magister. A disastrous move induced by an arrogant company, which of course leaves Linux desktop users out in the cold. In my article, I mentioned that I was looking at ways to render SilverLight based websites in a Linux browser. The most promising (in fact as it turned out,  the only) solution appeared to be Pipelight.

It took a while to get it all sorted out and make sense of the way in which the various pieces of software interact, but despite a busy work schedule I managed to pull it off in the end. This article will show you how to install and configure Pipelight on Slackware Linux without effort. Not just dutch Slackware users with children in secondary school will profit. You may definitely want to install Pipelight in order to view Netflix content on your Linux computer! Having a Netflix subscription forced you to boot a Windows computer but that is now history.

What is Pipelight and how does it render these SilverLight pages, and Netflix videos, and more, in your browser?

Project Pipelight utilizes the efforts made by Erich E. Hoover who created a set of Wine patches to get Playready DRM protected content working inside Wine. This modified Wine (wine-pipelight) is combined with a new browser plugin (pipelight) that embeds Silverlight directly in any Linux browser supporting the Netscape Plugin API (yes… the API which Google is planning to drop from its Chrome browser in 2014… not playing nice here, Google!).

Let me quote verbatim from the project page, because I can not phrase it better:

Pipelight consists out of two parts: A Linux library which is loaded into the browser and a Windows program started in Wine. The Windows program, called “pluginloader.exe”, simply simulates a browser and loads the Silverlight DLLs. When you open a page with a Silverlight application the library will send all commands from the browser through a pipe to the Windows process and act like a bridge between your browser and Silverlight. The used pipes do not have any big impact on the speed of the rendered video since all the video and audio data is not send through the pipe. Only the initialization parameters and (sometimes) the network traffic is send through them. As a user you will not notice anything from that “magic” and you can simply use Silverlight the same way as on Windows.

That is good news. And now, how to get this all working in Slackware?

? First, you need a couple of my packages (you may have some of them already). I made them available for Slackware 14.0 and 14.1, both 32-bit and 64-bit editions. Download and install the following packages for your Slackware version and architecture:

? Note that Wine is a 32-bit product (and the pre-compiled pipelight pluginloader comes as 32-bit binary only), so if you are running 64-bit Slackware you will have to switch it to a multilib system first. I noticed some references to wine64 in the piplelight sourcecode (un-implemented functionality as of yet) so there’s hope that multilib will not be needed in future.

? If you are running 64-bit Slackware, then you should download the 32-bit version of the OpenAL package and use the “convertpkg-compat32” program in order to create a multilib “compat32” package. You need to install that, instead of using the 64-bit package, otherwise Wine will not work. For instance (version and build numbers may change over time) using these commands:

# convertpkg-compat32 -i OpenAL-1.15.1-i486-2alien.tgz
# upgradepkg –install-new /tmp/OpenAL-compat32-1.15.1-x86_64-2aliencompat32.tgz

? The webcore-fonts-installer is a nifty package. It does not contain any Microsoft font (therefore I am allowed to distribute the package), but the post-installation script will automatically download and install the Microsoft Core Fonts for the Web for you. These fonts are required by SilverLight.

? Then, open a terminal and check out the new functionality by running the “pipelight-plugin” program. Use it to list the available plugins and to enable/disable one or more of these plugins. Do this as your own user account, not as the root user! The result of enabling a plugin is that a symbolic link to the corresponding shared library will be created in your ~/.mozilla/plugins/ directory.

$ pipelight-plugin –help

Supported plugins:
silverlight5.1
silverlight5.0
silverlight4
flash
shockwave
unity3d
$ pipelight-plugin –enable silverlight
Plugin silverlight5.1 is now enabled
$ pipelight-plugin –list-enabled
silverlight5.1

? Install a browser User Agent switcher. Some SilverLight sites will tell your Linux browser that it is unsupported, and you will have to make the server believe that your browser is running on Windows. For Firefox, you should pick https://addons.mozilla.org/en-US/firefox/addon/user-agent-overrider .

? Start your Firefox or Chrome browser (Konqueror should work too but I did not test that) and open the URL http://fds-team.de/pipelight/ which is the team’s diagnostics page. You can select one of the available plugins to test, and this will trigger the browser to try and load that pipelight plugin. The first time the plugin loads, it will automatically download and install the required Windows programs using the customized wine-pipelight program. You will see a few Windows installation dialogs (for SilverLight etc). These do not require any interaction, and you can sit back and relax. It will only take a short while, and then the disgnostics page will show the plugin’s status. The wine-pipelight program will install all its files in its own wine prefix so that it will not interfere with a “normal” version of  Wine which you may have installed already. The directory which is used, is  ~/.wine-pipelight/ .

pipelight03

SilverLight DRM (protected content) on Linux

In order to play protected content in SilverLight, Microsoft has invented PlayReady. The customized version of Wine which comes with Pipelight (wine-pipelight) implements this DRM support through Linux Extended Attributes (xattr). Your kernel has to support it for the filesystem you use. Slackware’s kernels have enabled this for most filesystems (below output is for a Slackware 13.37 kernel):

# zcat /proc/config.gz | grep XATTR
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT4_FS_XATTR=y
CONFIG_REISERFS_FS_XATTR=y
# CONFIG_JFFS2_FS_XATTR is not set
CONFIG_UBIFS_FS_XATTR=y
CONFIG_SQUASHFS_XATTR=y
# CONFIG_CIFS_XATTR is not set

The Linux extended filesystems (ext2, ext3, ext4) enable extended attributes by default when you mount them. Other filesystem types may require a mount option in /etc/fstab.

Troubleshooting Pipelight issues

  • Running Firefox from the command line will show debugging output from the pipelight plugin when you go to http://fds-team.de/pipelight/
  • When using the UserAgent control to spoof your browser and OS, try not to pick MS Internet Explorer. Apparently, only disguising as Firefox/Windows will work with Netflix.
  • If you are using Firefox and the pipelight diagnostics page informs you that SilverLight was installed OK but that your browser’s plugin cache needs to be cleared, you should follow the advice. If you don’t do that, Firefox will not reload the plugin on the next start. To clear the plugin cache, type “about:support” in your address line and hit Enter. You should now see a button which opens your profile directory. Click on it and remove the “pluginreg.dat” file. Restart your browser and check if it works (don’t worry, the “pluginreg.dat” file will be automatically re-created).
  •  If Netflix informs you that you are logged in with another browser or tab and you are certain that you are not, you need to close your browser windows and then kill off all of the wine services, plugin-container and pluginloader.exe processes. Then start your browser again. The Wine processes are left-overs from a previous (failed) attempt to load the pipelight plugin.

Enjoy! Eric