Skip to content

Instantly share code, notes, and snippets.

@ruario
Last active June 22, 2023 22:56
Show Gist options
  • Save ruario/ca342ff30c7c5cbe0b51f36650d65b28 to your computer and use it in GitHub Desktop.
Save ruario/ca342ff30c7c5cbe0b51f36650d65b28 to your computer and use it in GitHub Desktop.
This script simply extracts and registers a Vivaldi Linux deb or rpm package with your Desktop Environment. Not a proper "install" but basically usable as such without the need for an appropriate package manager or root access.
@ruario
Copy link
Author

ruario commented Jun 21, 2023

Running it with a Vivaldi package as the only command line argument would result in the following:

$ ./register-vivaldi.sh ~/.opt/vivaldi-stable-6.1.3035.100-1.x86_64.rpm
Extracting: vivaldi-stable-6.1.3035.100-1.x86_64.rpm...
Creating symlinks:

'/home/ruario/.local/share/icons/hicolor/128x128/apps/vivaldi.png' -> '/home/ruario/.opt/vivaldi-stable-6.1.3035.100-1.x86_64/opt/vivaldi/product_logo_128.png'
'/home/ruario/.local/share/icons/hicolor/16x16/apps/vivaldi.png' -> '/home/ruario/.opt/vivaldi-stable-6.1.3035.100-1.x86_64/opt/vivaldi/product_logo_16.png'
'/home/ruario/.local/share/icons/hicolor/22x22/apps/vivaldi.png' -> '/home/ruario/.opt/vivaldi-stable-6.1.3035.100-1.x86_64/opt/vivaldi/product_logo_22.png'
'/home/ruario/.local/share/icons/hicolor/24x24/apps/vivaldi.png' -> '/home/ruario/.opt/vivaldi-stable-6.1.3035.100-1.x86_64/opt/vivaldi/product_logo_24.png'
'/home/ruario/.local/share/icons/hicolor/256x256/apps/vivaldi.png' -> '/home/ruario/.opt/vivaldi-stable-6.1.3035.100-1.x86_64/opt/vivaldi/product_logo_256.png'
'/home/ruario/.local/share/icons/hicolor/32x32/apps/vivaldi.png' -> '/home/ruario/.opt/vivaldi-stable-6.1.3035.100-1.x86_64/opt/vivaldi/product_logo_32.png'
'/home/ruario/.local/share/icons/hicolor/48x48/apps/vivaldi.png' -> '/home/ruario/.opt/vivaldi-stable-6.1.3035.100-1.x86_64/opt/vivaldi/product_logo_48.png'
'/home/ruario/.local/share/icons/hicolor/64x64/apps/vivaldi.png' -> '/home/ruario/.opt/vivaldi-stable-6.1.3035.100-1.x86_64/opt/vivaldi/product_logo_64.png'
'/home/ruario/.local/share/applications/vivaldi-stable.desktop' -> '/home/ruario/.opt/vivaldi-stable-6.1.3035.100-1.x86_64/usr/share/applications/vivaldi-stable.desktop'

        NOTE: You may need to re-login before Vivaldi shows up!

                                  ***

        To remove symlinks and de-register Vivaldi issue:

  '/home/ruario/.opt/vivaldi-stable-6.1.3035.100-1.x86_64/register' -d

This version of Vivaldi (snapshot) would now be available from Gnome, KDE Plasma, Xfce, etc. menus and launcher.

@ruario
Copy link
Author

ruario commented Jun 21, 2023

It does not really matter so much if you choose an rpm or deb package, since an install is not taking place and thus neither the rpm nor dpkg commands need to be present.

It may be slightly more reliable to use the rpm because the deb package needs ar for extraction and some distros do not install this by default. While the rpm package does rely on cpio as part of its extraction, this is (almost always) preinstalled.

In either case, if you found that ar or cpio were not present, just install the "binutils" or "cpio" packages (respectively) via your package manager, before attempting to run the script again.

@chrisdlees
Copy link

Wow, randomly came across this after reading a 5 year old blog post about with "Vivaldi" was dropped from the useragent. Incredibly helpful, as I was working on making a portable version of my Vivaldi ~/.config an hour ago. Been distro hopping like crazy, and I'm finally tired of losing my RSS feeds, email DBs, and note images lol

Sidenote: can my Win64 vivaldi-snapshot-bin also point at the same profile/.config?

@ruario
Copy link
Author

ruario commented Jun 22, 2023

Sidenote: can my Win64 vivaldi-snapshot-bin also point at the same profile/.config?

You mean you would have the settings on a disc that is shared between two OSes and both Vivaldi for Linux and Vivaldi for Windows would point to it?

Things will break that way in subtle and not so subtle ways, so I would not recommend it. I think sync would be a better option to be honest.

P.S. Since you are here, I will let you on to a little secret. I wrote this for my own use because as a Vivaldi employee I have access to a constant stream of new builds and this is easier than installing on various test machines (Virtual or otherwise), not least on non rpm/deb based distros.

That said, I actually made a slightly better solution for public builds. When the builds are uploaded (by a script I wrote) I convert them on the fly to generic tar packages, which include an installer/uninstaller (plus a couple of ways to run them without installing). These packages are not publically listed on the website because they are non official (and hence not really supported) but if you know the current version number you can guess the URL, e.g. as I write this stable is version 6.1.3035.100 and thus:

https://downloads.vivaldi.com/stable/vivaldi-stable-6.1.3035.100-x64.tar

P.P.S. Be sure to read the README.md ;)

@ruario
Copy link
Author

ruario commented Jun 22, 2023

Oh and for snapshots there is also:

https://downloads.vivaldi.com/snapshot/vivaldi-snapshot-6.2.3054.3-x64.tar

Or, linked from the blog you have:

https://downloads.vivaldi.com/snapshot/install-vivaldi.sh

which I also wrote! :P

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