Skip to content

Instantly share code, notes, and snippets.

@ruario
ruario / README.md
Last active January 7, 2023 20:52
Installs (or updates) PPAPI Flash, so that it can be used by Chromium-based browsers

Usage

If you use Ubuntu or a derivative distro, issue the following to install an appropriate version of Flash:

sudo add-apt-repository "deb http://archive.canonical.com/ubuntu `lsb_release -cs` partner" 
sudo apt update
sudo apt install adobe-flashplugin

If your distro does not provide a copy of Pepper Flash that works with Vivaldi, this script will download and install it for you. To use, click on the "Download ZIP" button listed on the GitHub Gist page and then unpack the .zip archive locally. You should now have a directory containing the file "latest-pepper-flash.sh".

@ruario
ruario / example-spec-files.md
Last active February 11, 2020 16:57
Example rpm .spec files for recent versions of Opera.

The following are some example .spec files I created to demonstrate how to deal with a more recent libudev version and the different naming of libcrypto on Fedora, via the use of compatibility symlinks. I do this in post install for maximum compatibility as the resultant rpms could also be used on systems where libudev and libcrypto naming matches what Opera expects.

To fetch all the .spec files:

git clone https://gist.github.com/f0183807a9f708067475.git

Place the version of Opera you wish to repackage in your sources directory (usually ~/rpmbuild/SOURCES). Tweak the Version field in the .spec file(s).

To repackage Opera stable:

@ruario
ruario / rpm4opera
Last active January 11, 2016 09:24
Converts Opera deb packages into rpm format
#!/usr/bin/env bash
available () {
command -v "$1" >/dev/null 2>&1
}
rpmcheck () {
if [ -e "$1" ]; then
echo "$1 is already present, delete it if you want to recreate it"
exit 0
@ruario
ruario / opera-developer-standalone.md
Last active August 29, 2015 14:12
Extracting Opera from the .deb package to run in place with a self-contained profile.

Running Opera without installing it

Using Opera developer version (28.0.1719.0) as an example:

ar p opera-developer_28.0.1719.0_amd64.deb data.tar.xz | tar -xJf- --strip 4 --exclude opera_sandbox --wildcards './usr/lib/*'
opera-developer/opera-developer --user-data-dir=opera-developer/profile &

For comparison with Opera 12:

tar xf opera-12.16-1860.x86_64.linux.tar.xz

@ruario
ruario / flareget-slackware-package.sh
Last active August 29, 2015 14:13
Flareget package for Slackware. I didn't use makepkg, in case Flareget upstream want an easy way to create Slackware compatible packages directly, without requiring local copies of Slackware packaging tools.
#!/bin/sh
# As this is a binary repack, it can be run on any Linux distro.
# I account for the 'quirks' of Slackware packaging.
flareget_version=${flareget_version:-4.1.80}
deb_ver=$(echo ${flareget_version} | sed 's/\([0-9]\+\.[0-9]\+\)\.\([0-9]\+\)/\1-\2/')
ARCH=${ARCH:-$(uname -m)}
case "$ARCH" in
x86_64) deb_arch=amd64 ;;
i?86) deb_arch=i386 ;;
*) echo "$ARCH is unsupported"; exit 1 ;;
@ruario
ruario / 1-patchelf.md
Last active December 13, 2023 02:46
Fetching, building and installing PatchELF

The following assumes you want a single user install. If you want a system wide install instead, run the attached script create-patchelf-pkg.sh (after first installing a suitable build environment).

Note: create-patchelf-pkg.sh also provides an uninstall script.

Setting up a Build Environment

Install a basic build environment (if you don't already have one). How to install this varies from distro to distro. Your best bet to refer to your distro's wiki or ask in their forums. That said, here are a few example install commands for a few of the popular distros:

  • Ubunt/Mint/Debian: sudo install build-essential
  • Fedora: sudo dnf install @development-tools
@ruario
ruario / vivaldi-test.md
Last active August 29, 2015 14:14
Testing the Vivaldi TP on Linux systems

Testing the Vivaldi TP on Linux systems where no package is available

Fetch the rpm package:

wget http://vivaldi.com/download/Vivaldi_TP_1.0.83.38-1.x86_64.rpm

Switch to root (use sudo -s, if your system only uses sudo), then extract its core contents into /opt:

tail -c+83823 Vivaldi_TP_1.0.83.38-1.x86_64.rpm | bzcat | ( cd / ; cpio -imd './opt/vivaldi/*' )

exit # To leave the root environment

@ruario
ruario / README.md
Last active August 29, 2015 14:18
Unpacks a Google Chrome rpm package into a version named directory and creates a startup script that will cause it to save its profile within this directory (Useful for testing).

This script converts a Google Chrome rpm package into standalone (portable) format. Usage example:

sh standalone-google-chrome.sh google-chrome-stable_current_x86_64.rpm

When the script is done you will have a suitably version named directory. You can run the copy of Google Chrome stored within it as follows:

google-chrome-stable-41.0.2272.118-1/run &

Copy or move the directory wherever you like.

@ruario
ruario / standalone-vivaldi.md
Last active April 16, 2024 01:54
Unpacks a Vivaldi Linux browser package into a version named directory and creates a startup script that will cause it to save its profile within this directory—Useful for testing or standalone (portable) installs.

Disclaimer: I wrote this script for my own personal use. Completely unofficial and unsupported by Vivaldi Technologies. However, others are welcome to use it at their own risk.

This script converts a Vivaldi browser Linux package into standalone, self-contained install. It lets you use the rpm and deb packages in a similar way to how people generally used the old Opera (Presto) tar packages—for quick testing, without committing to a full, system-wide install. This could be used for testing a specific setup or version, without touching the system wide settings (profile). It can also be used to create a portable (USB install) of Vivaldi that you could store on an external disk, for sharing between computers. A script that supports integration with the desktop environment is also provided.

Usage example:

sh standalone-vivaldi.sh vivaldi-snapshot-1.7.702.1-1.x86_64.rpm

When the script is done you will have a suitably version named directory.

@ruario
ruario / install-vivaldi.md
Last active September 8, 2021 13:48
This script automates extracting the contents of a Vivaldi package and installing it into the XDG data home directory (typically "$HOME/.local/share"). It also provides a convenient uninstall script.

Summary

Vivaldi Technologies currently only provide .deb and .rpm packages but it is possible to install it on different distros. This install script automates the process.

Install and Upgrade

You can use the script to fetch and install the latest public snapshot like so:

chmod +x install-vivaldi.sh # Only needed the first time