Skip to content

Instantly share code, notes, and snippets.

@ruario
ruario / register-named-vivaldi-build.sh
Last active Jul 11, 2020
This script allows you to extract and register with your Desktop Environment a Vivaldi Linux deb build with a unique keyword, to assist with multiple side-by-side installs
View register-named-vivaldi-build.sh
#!/bin/sh -eu
if [ "x${1:-}" = "x-n" ] && [ -n "${2:-}" ]; then
name="${2#vivaldi-}"
class="Vivaldi-$name"
echo "Using the name: vivaldi-$name"
shift 2
else
echo -e "You must supply a name like so:\n\n $0 -n keyword\n" >&2
exit 1
fi
@ruario
ruario / vivaldi-linux-media-single-user.md
Last active Sep 7, 2020
Running the the Vivaldi Linux update-ffmpeg and update-widevine scripts without using root
View vivaldi-linux-media-single-user.md

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

@ruario
ruario / make_vivaldi_sbo_pkg.sh
Last active Sep 8, 2020
A script to simplify maintaining the SBo version of Vivaldi for Slackware
View make_vivaldi_sbo_pkg.sh
#!/bin/sh -eu
TMP="${TMP:-/tmp}"
REPACKDIR="$TMP/vivaldi-sbo-tar/vivaldi"
mkdir -p "$REPACKDIR"
cd "$REPACKDIR"
# Find out ffmpeg version
FFMPEG_VERSION="$(wget -qO- https://launchpad.net/ubuntu/+source/chromium-browser/+publishinghistory | grep -o '\([0-9]\+\.\)\{3\}[0-9]\+-0ubuntu0\.16\.04\(\.[0-9]\)\+' | head -n1)"
@ruario
ruario / chrome-ua-test.md
Last active Feb 6, 2020
Launching Google Chrome with a Vivaldi User Agent
View chrome-ua-test.md

The following will allow you to test Chrome with a Vivaldi user agent. Shutdown Chrome and start a Terminal (or cmd.exe on Windows), then paste in the code that is relevant for your platform and press “Enter”–you can triple-click to select an entire line.

Testing with Chrome

NOTE: There is little point testing in Vivaldi because old versions already had workarounds for these specific issues and from 2.10 onwards we use a Chrome User Agent string.

Windows

"%PROGRAMFILES(X86)%\Google\Chrome\Application\chrome.exe" --user-agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.94 Safari/537.36 Vivaldi/2.10.1745.21"
@ruario
ruario / macos-private.md
Last active Mar 31, 2020
A small App that starts Vivaldi for macOS as a Private Window
View macos-private.md

Vivaldi Private Window Launcher for macOS

The following commands will produce a small application that allows you to launch Vivaldi in Private mode on a Mac.

Start Terminal paste in the the following code (pressing Enter when done):

mkdir -p Vivaldi\ Private.app/Contents/MacOS
printf '#!/bin/sh\nopen -a Vivaldi.app --args --incognito' > Vivaldi\ Private.app/Contents/MacOS/Vivaldi\ Private
chmod +x Vivaldi\ Private.app/Contents/MacOS/Vivaldi\ Private
@ruario
ruario / f2sb.sh
Last active Oct 18, 2019
A script for those who "Forgot to make a SlackBuild". Following a manual install (e.g. `make install`), use this script to make a Slackware package.
View f2sb.sh
#!/bin/sh -eu
#
# This script allows you to create a Slackware package from software you
# previously installed manually (e.g. via `make install`).
#
# Usage:
#
# ./script name-version /path/to/reference/file [seconds]
#
# Provide the name and version of the package, path to one file that forms
@ruario
ruario / make-install-remove.md
Last active Nov 23, 2020
Uninstalling (removing) a package installed via make install. No make uninstall target required
View make-install-remove.md

make install, uninstall help (howto remove)

Background

A common mistake for users who are new to Linux (and even a few seasoned users) is to install a package from source without any clear idea about how they will remove it in the future, should they want to.

The classic instructions to install a source package are ./configure && make && make install. This (or slight variants) can work nicely for installation but

@ruario
ruario / make-vivaldi-private-desktop-launcher.sh
Last active Dec 20, 2019
Run this to create a Vivaldi launcher for Linux desktops that always starts in private mode.
View make-vivaldi-private-desktop-launcher.sh
#!/bin/sh
mkdir -p ~/.local/share/applications
cat << END > ~/.local/share/applications/vivaldi-private.desktop
[Desktop Entry]
Version=1.0
Name=Vivaldi (Private)
Exec=vivaldi-stable --incognito
StartupNotify=true
Terminal=false
Icon=vivaldi
@ruario
ruario / 1-README.md
Last active Nov 24, 2020
A script that fetches a ChromeOS image for ARM32 and extracts the Widevine and Flash binaries, saving them in a compressed archive for use with Vivaldi
View 1-README.md

The included script 'widevine-flash_armhf.sh' fetches a ChromeOS image for ARM and extracts the Widevine and Flash binaries, saving them in a compressed archive. Since it downloads a fairly large file (2Gb+ on disk after download) it is recommended that you run the script on a machine that has plenty of disk space.

To install the resultant archive, issue the following on your ARM machine–after copying over the archive if needed:

sudo tar Cfx / widevine-flash-20200124_armhf.tgz

(Where 'widevine-flash-20200124_armhf.tgz' is updated to reflect the actual name of the created archive)

@ruario
ruario / lnx-2.0-proprietary-media-short.md
Last active Nov 7, 2018
Vivaldi 2.0 Linux Proprietary media, quick answer
You can’t perform that action at this time.