Well this has plagued me for years, trying to run Netflix on Linux. The root cause for Netflix not working on Linux is Microsoft Silverlight, the viewer Netflix uses to stream the movies (Its a plugin like Flash). Now Linux DOES have an open source equivalent called Moonlight, however it does not have DRM (Digital Rights Management) support which Netflix requires to run.

netflix600
I search about 2 years ago or so for a solution and came up with NOTHING at all on how to accomplish this. Between then and now I am sure a few tutorials of how to hack it using Wine have appeared, but dealing with Wine and getting things to work right can be a bit tricky, and definitely not for everyone. (I have tried a few installs using wine and have managed, after several hours of failing first, to get Dreamweaver and Photoshop up and running so that I could a customer some samples on, at the time, my only laptop, which ran, of course, linux).

Now, things are much MUCH simpler, for those of you who use Ubuntu or related flavours at least. It may work on other Debian pasted systems (unverified) as long as they support the apt-get install apps. I myself run Pear, an Apple OS knock off (looks wise) based on Ubuntu. I was able to get Netflix up and running using the following commands:


sudo apt-add-repository ppa:ehoover/compholio
sudo apt-get update
sudo apt-get install netflix-desktop

Once complete, find Netlix Desktop in your Unity Dash. The first run will finalize the install of Wine and Silverlight, as well as anything else it needs to complete, you may have to run it a second time. Now it takes a bit of time, granted, but I would rather not have to do it all manually:

[toggle state=”closed” title=”Manually – Option One”]
  1. Compile the latest version of Wine from the “git” repository with the following patches:
    [1/3] http://goo.gl/7sauYT
    [2/3] http://goo.gl/5kcvze
    [3/3] http://goo.gl/K2wnn9
  2. Create a new Wine prefix
  3. Download and install a recent Windows version of Firefox:
    wget -O Firefox-14.0.1.exe http://goo.gl/zOgq6h; wine Firefox-14.0.1.exe /S
  4. Download and install Silverlight 4 (Silverlight 5 does not work):
    wget -O Silverlight-4.exe http://goo.gl/18PMHS; wine Silverlight-4.exe /q
  5. Launch Firefox
  6. Login to Netflix and attempt to play a movie/show

Further details can be found on the two remaining bugs:

Also, see Erich Hoover’s howto and PPA: http://goo.gl/kkcq6

[/toggle] [toggle state=”closed” title=”Manually – Option 2 (Fedora)”]
  1. Install GCC 4.5. Using the default (4.7) didn’t work for me, but 4.5 did
    1. sudo yum install gcc mpfr-devel libmpc libmpc-devel glibc-devel
    2. wget http://goo.gl/PHYugO (Substitute your closest mirror from http://goo.gl/pkTkIi)
    3. tar xjf gcc-4.5.4.tar.bz2
    4. cd gcc-4.5.4
    5. ./configure –program-suffix=45 –enable-languages=c,c++
      • This caused me some problems later on since apparently not everything gets properly isolated, maybe a better idea is to compile it with –prefix=/usr/local/gcc45 – if you do, adjust step below accordingly
    6. make
    7. sudo make install
  2. Compile latest Wine-git with all the proper patchesNote:
    1. git clone git://source.winehq.org/git/wine.git ~/wine-git
    2. cd ~/wine-git
      • Tested with commit 098b3c72941c810a8b4f2712e70654312bba5857. If you want to make sure you get the same, run
    3. Apply patches:
      1. wget -O part1.patch http://goo.gl/QC2x8f && patch -p1 < part1.patch
      2. wget -O part2.patch http://goo.gl/rU9d4e && patch -p1 < part2.patch
      3. wget -O part3.patch http://goo.gl/LmSyYd && patch -p1 < part3.patch
      4. wget -O part4.patch http://goo.gl/owWP9E && patch -p1 < part4.patch
        • This one is already in git, so trying to apply it would fail: wget -O part5.patchhttp://goo.gl/Sk4XU3 && patch -p1 < part5.patch
      5. git show e2900c23c7f0b143078da780c9a0ff19a895bf45 | patch -p1 -R
        • Some screwy patch from earlier doesn’t let Silverlight setup run correctly, revert it
    4. ./configure CC=/usr/local/bin/gcc45 –prefix=/usr/local/wine-git
      • Better keep the patched version separate from the system-installed wine
    5. make
    6. sudo make install
  3. Download and install a recent Windows version of Firefox (exact version doesn’t matter, so I used the most recent one):
    1. wget -O Firefox-16.0.2.exe http://goo.gl/nC8Juq
    2. WINEPREFIX=/home/<MY_USERNAME>/.wine-netflix /usr/local/wine-git/bin/wine Firefox-16.0.2.exe
      • WINEPREFIX=… to keep it isolated from other wine-installed programs
  4. Download and install Silverlight 4 (Silverlight 5 does not work):
    1. wget -O Silverlight-4.exe http://goo.gl/18PMHS
    2. WINEPREFIX=/home/<MY_USERNAME>/.wine-netflix /usr/local/wine-git/bin/wine Silverlight-4.exe
  5. Now you can finally run it:
    • WINEPREFIX=/home/<MY_USERNAME>/.wine-netflix /usr/local/wine-git/bin/wine C:\Program Files\Mozilla Firefox\firefox.exe netflix.com
[/toggle]

(thanks to How-to.wikia.com for the long versions)

Some minor issues though you will have to be aware of, as you may or may not experience this. When I booted Netflix Desktop for the thirst time, all the install was finished, and it get me into the site, it was a little slow at first, which was to be expected as I was running it on a crappy laptop, but it was a bit more sluggish than usual which means that the Wine and Silverlight do pull a bit of resources. When I went to play a movie, all I got was a black screen. If you get this, try and alt+tab to another app, or desktop and the picture will appear. Although Netflix Desktop appears in full screen mode, F11 will get you out, but my screen (where the movie should have been playing) was still black, till I alt+tabbed, then it magically appeared and ran fine.

Now I get to enjoy Netflix on my Linux Laptop as well as my Windows Desktop.