Netflix on Linux without Silverlight
Netflix HTML5 Player
Netflix is currently the only VoD provider to offer an HTML5 player as well. It works thanks to the full implementation of Encrypted Media Extensions (EME) [10] – but only with Chrome, Internet Explorer, and Safari; that is, on Linux, you must use Google Chrome. Open source browsers Chromium, Firefox, and Opera all lack the EME extension.
Having Chrome as your browser is not enough, however. If Netflix detects (via a message sent by the browser user agent) that you are using Linux, you again end up on the website with the system requirements. Only after tweaking the browser identification using the User Agent Switcher extension [11] for Chrome (Figure 3) does Netflix finally deliver HTML5 video. To accomplish this, install the extension and then set up a matching user agent in the add-on options as per the information in Table 1.
Table 1
User Agent Switcher Options
Option | Value |
---|---|
User-agent name |
Netflix Linux |
User-Agent String |
Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2114.2 Safari/537.36 |
Group |
Chrome |
Append? |
Replace |
Indicator Flag |
IE |
On rolling release distributions (e.g., Arch Linux), Netflix then loads the Linux-friendly HTML5 stream (Figure 4). However, on older or even slightly dated distributions, such as Ubuntu 14.04, you need to install an update for the NSS library published on September 22 to help the browser handle the encryption technology used by Netflix (see the box "Netflix on Ubuntu 14.04").
Netflix on Ubuntu 14.04
Beyond Chrome and the right User-Agent string, Netflix on a Linux system also needs the Network Security Services libraries [12] by Mozilla, version 3.16.2 or later. However, the current Ubuntu 14.04 LTS only came with version 3.15.4. Therefore, despite Chrome and a matching user agent, the screen remains blank on Ubuntu – unless you have smuggled the version of the library used in Ubuntu 14.10 into 14.04.
After a discussion on the ubuntu-devel mailing list [13], Canonical quickly resolved this issue. The library update necessary for Netflix is now in the Security repositories of Ubuntu 12.04 and 14.04, and can be imported as normal security update. In case of difficulties with Netflix, you should thus check first to see whether your Ubuntu has appropriate libnss3
version 3.17-0 or later:
$ dpkg -l libnss3* | grep ii
If you already followed a popular posting on the web and manually updated libnss3 in Ubuntu 14.04, then you can use the commands in Listing 1 to install the original packages. If the download via wget
fails, then Canonical has probably revised the packages in the meantime and changed the version number. In this case, manually download the DEB packages for libnss3 [14], Libnss3-1d [15], and libnss3-nssdb [16] off the web.
Listing 1
Install libnss3 Package
(Make Your Own) Conclusions
Whether the movie and serial offerings from Netflix are superior to those of other VoD providers is something you can only decide for yourself – all of these services offer a free trial period in which to make your own conclusions. That said, the Netflix HTML5 player is a unique selling point for Linux users. Now that Ubuntu 12.04 and 14.04 can officially be updated to meet the system requirements for Netflix, the company has promised to make the user agent query more Linux friendly in the near future [17].
Now Netflix only needs to free itself from the grasp of Chrome for users to access the service directly in Kodi (formerly: XBMC), which would open up a whole new world to the Raspberry Pi. Mozilla would also have to complete its own implementation of EME, which was announced in May 2014 [18], making it the first open source solution for DRM in HTML5 video elements that would run on the Raspberry Pi.
Infos
- "Are young people watching less TV?" MarketingCharts.com: http://www.marketingcharts.com/television/are-young-people-watching-less-tv-24817/
- "Comparison of TV, Online Video and Smartphone Video Viewer Profiles" MarketingCharts.com: http://www.marketingcharts.com/traditional/comparison-of-tv-online-video-and-smartphone-video-viewer-profiles-41217/
- "TV and Media," Ericsson Consumer Insight Summary Report, August 2013: http://www.ericsson.com/res/docs/2013/consumerlab/tv-and-media-consumerlab2013.pdf
- Netflix availability: https://help.netflix.com/en/node/412#where-is-netflix-available-
- Netflix one-month trial: https://help.netflix.com/en/node/412#how-does-the-free-trial-work-
- Chromecast: http://www.google.com/chrome/devices/chromecast/
- Roku Streaming Stick: https://www.roku.com/products/streaming-stick
- Netflix app for Android: https://play.google.com/store/apps/details?id=com.netflix.mediaclient
- "Pipelight" by Christoph Langner, Linux Pro Magazine, issue 165, August 2014, pg. 64, http://www.linuxpromagazine.com/Issues/2014/165/Pipelight-Using-Silverlight-on-Linux
- Encrypted Media Extensions: https://dvcs.w3.org/hg/html-media/raw-file/tip/encrypted-media/encrypted-media.html
- User Agent Switcher for Chrome: https://chrome.google.com/webstore/detail/user-agent-switcher-for-c/djflhoibgkdhkhhcedjiklpkjnoahfmg
- Network Security Services: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS
- Ubuntu-devel: Up-rev NSS lib: https://lists.ubuntu.com/archives/ubuntu-devel-discuss/2014-September/015049.html
- Libnss3 from "Trusty": http://packages.ubuntu.com/trusty/libnss3
- Libnss3-1d from "Trusty": http://packages.ubuntu.com/trusty/libnss3-1d
- Libnss3-nssdb from "Trusty": http://packages.ubuntu.com/de/trusty/libnss3-nssdb
- Ubuntu-devel: Lift user agent filtering: https://lists.ubuntu.com/archives/ubuntu-devel-discuss/2014-September/015050.html
- "Reconciling Mozilla's Mission and W3C EME" by Andreas Gal, Mozilla Hacks: https://hacks.mozilla.org/2014/05/reconciling-mozillas-mission-and-w3c-eme/
« Previous 1 2
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
So Long Neofetch and Thanks for the Info
Today is a day that every Linux user who enjoys bragging about their system(s) will mourn, as Neofetch has come to an end.
-
Ubuntu 24.04 Comes with a “Flaw"
If you're thinking you might want to upgrade from your current Ubuntu release to the latest, there's something you might want to consider before doing so.
-
Canonical Releases Ubuntu 24.04
After a brief pause because of the XZ vulnerability, Ubuntu 24.04 is now available for install.
-
Linux Servers Targeted by Akira Ransomware
A group of bad actors who have already extorted $42 million have their sights set on the Linux platform.
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.