Skip to content

Commit a75f413

Browse files
authored
Merge pull request #3 from jarrellmark/master
Support widevine in Ubuntu 20.04 by supporting the Chromium snap package
2 parents 79aa01e + 5dde8c8 commit a75f413

File tree

2 files changed

+12
-29
lines changed

2 files changed

+12
-29
lines changed

README.md

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# Note: This is a fork of proprietary/chromium-widevine that works on Ubuntu 20.04 / 20.04.1 LTS.
2+
3+
There is a [pull request](https://github.com/proprietary/chromium-widevine/pull/3) to get this upstream into [proprietary/chromium-widevine](https://github.com/proprietary/chromium-widevine).
4+
5+
Only tested on the instructions for `(easiest) Install Google Chrome and use its Widevine distribution` (see below).
6+
17
# Installing Widevine on Chromium on GNU/Linux
28

39
Or: How to get Spotify/Netflix working on Chromium in Linux
@@ -25,39 +31,11 @@ The following script symlinks Google Chrome's Widevine library to Chromium's dir
2531
Paste this into your terminal:
2632

2733
```bash
28-
git clone https://github.com/proprietary/chromium-widevine.git && \
34+
git clone https://github.com/jarrellmark/chromium-widevine.git && \
2935
cd chromium-widevine && \
3036
./use-from-google-chrome.sh
3137
```
3238

33-
## (alternative) Install Widevine alone without Google Chrome
34-
35-
Paste this into your shell:
36-
37-
```bash
38-
git clone https://github.com/proprietary/chromium-widevine.git && \
39-
cd chromium-widevine && \
40-
./use-standalone-widevine.sh && \
41-
killall -q -SIGTERM chromium-browser || \
42-
killall -q -SIGTERM chromium && \
43-
exec $(command -v chromium-browser || command -v chromium) ./test-widevine.html &
44-
```
45-
46-
The first method using Google Chrome just copied one directory from its installation. Observe the Widevine directory in the Google Chrome distribution:
47-
48-
```text
49-
/opt/google/chrome/WidevineCdm
50-
├── LICENSE
51-
├── manifest.json
52-
└── _platform_specific
53-
└── linux_x64
54-
└── libwidevinecdm.so
55-
```
56-
57-
We don't actually need the whole Google Chrome installation. We can recreate that tree in the Chromium directory (i.e., `/usr/lib/chromium`) with a standalone distribution of the Widevine shared library. Copying just `libwidevinecdm.so` into `/usr/lib/chromium` doesn't work.
58-
59-
N.B. Disadvantage of this method: You might have to manually re-run this script whenever Chromium updates to get the latest Widevine. The first method piggybacks Google Chrome's distribution which is assumed to be up-to-date and updated by the same package manager that updates Chromium. Use that method unless you really don't want Google Chrome on your system.
60-
6139
## Test Widevine
6240

6341
Paste into terminal (*warning: restarts Chromium*):

find-chromium.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,16 @@ if [ -d /usr/lib/chromium ]; then
2121
elif [ -d /usr/lib/chromium-browser ]; then
2222
# Ubuntu
2323
CHROMIUM_DIR=/usr/lib/chromium-browser
24+
elif [ -d $HOME/snap/chromium/current/.local ]; then
25+
# Snap
26+
mkdir -p $HOME/snap/chromium/current/.local/lib
27+
CHROMIUM_DIR=$HOME/snap/chromium/current/.local/lib
2428
else
2529
>&2 echo <<EOF
2630
Where is lib/ for chromium installed? Couldn't find it on the normal paths like:
2731
/usr/lib/chromium
2832
/usr/lib/chromium-browser
33+
$HOME/snap/chromium/current/local/lib
2934
3035
Edit ./find-chromium.sh and set CHROMIUM_DIR to that directory.
3136
EOF

0 commit comments

Comments
 (0)