Skip to content

Instantly share code, notes, and snippets.

@ruario
Last active September 20, 2021 14:31
Show Gist options
  • Save ruario/995728dd8123540d331052e0ce648439 to your computer and use it in GitHub Desktop.
Save ruario/995728dd8123540d331052e0ce648439 to your computer and use it in GitHub Desktop.
Running the the Vivaldi Linux update-ffmpeg and update-widevine scripts without using root

Intro

The update-ffmpeg and update-widevine scripts included in the Vivaldi install directory are provided to fix situations where proprietary media (AVC/H.264 and AAC) and Widevine (DRM/EME) respectively, are not setup correctly.

These scripts are primarily intended to be run as root (or under sudo) as they create and update files and directories that are root owned. However both support a command line option (--user) that adjusts their installation directories and thus allows them to be run without escalation.

The --user options were made for internal usage, with locally ‘unpacked’ copies of Vivaldi (i.e. not installed). However, it is possible to use them with standard installs (albeit with a little tweaking in the case of update-widevine).

update-ffmpeg

To install proprietary media for just your current user issue the following:

/opt/vivaldi/update-ffmpeg --user

update-widevine

To install Widevine for just your current user, a couple more steps are required. This is because the script still attempts to adjust symlinks within the (typically root owned) Vivaldi install directory.

You can adjust the script as it runs, to disable the symlink creation, which would otherwise cause failure:

sed -r 's/^ *(rm|ln) -f.*/:/' /opt/vivaldi/update-widevine | sh -eus -- --user

Now create meta data in your Vivaldi user data directory that points to alternative Widevine install location–triple click to select the entire line:

echo "{\"Path\":\"$HOME/.local/lib/vivaldi/WidevineCdm\"}" > "${XDG_CONFIG_HOME:-$HOME/.config}/vivaldi/WidevineCdm/latest-component-updated-widevine-cdm"

Note: Change all “vivaldi” references in the above commands to “vivaldi-snapshot”, if you use the snapshot version.

@jefff1979
Copy link

@icf20 - I ran into the same issue. I used a mobile hotspot from work to test and see if it would download from launchpadlibrarian.net it worked.

After checking I found out that it was being blocked by pfSense. launchpadlibrarian.net was listed as malware on one of the DNS Blocker lists I use. I just added it to a whitelist. You can test it by just pointing a browser at launchpadlibrarian.net It should show a page that says:

"http://librarian.launchpad.net/ is a file repository used by Launchpad"

The odd thing is that it showed a certificate error instead of being blocked. I guess it resolves the name, but fails to get the cert from the URL.

@ruario
Copy link
Author

ruario commented May 21, 2021

@jefff1979 Strange that launchpadlibrarian.net (a domain owned and controlled by Canonical/Ubuntu) would be in a malware list.

@jefff1979
Copy link

@ruario

That's the same thing I thought. I'm not sure why it was on the block list. I'd have to check to see which list I was using.

@BloodyIron
Copy link

update-ffmpeg results in 404 not found, and now codecs broken in latest Vivaldi update:

HTTP request sent, awaiting response... 404 Not Found

yay, good thing I updated vivaldi... not

@ruario
Copy link
Author

ruario commented Sep 20, 2021

@BloodyIron That URL broke, today. We will get out a fix ASAP. In the mean time:

https://gist.github.com/ruario/fd278f3fdc947e045f3b09b3ad792588

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment