How do I install multiple versions of Chrome? I would like to say, I want Chrome, not Chromium. Or is there a extension (like Firefox)?
5 Answers
Update January 2020: I am splitting this answer into 3 parts.
Part 1 (Dec 2016): Running multiple configurations of the same version of Chromium.
I launch four distinct copies of Chromium using the --user-data-dir
as follows:
chromium-browser --user-data-dir=/home/<user>/.config/chromium1
chromium-browser --user-data-dir=/home/<user>/.config/chromium2
chromium-browser --user-data-dir=/home/<user>/.config/chromium3
chromium-browser --user-data-dir=/home/<user>/.config/chromium4
It appears the same command line option works for Chrome: http://www.ericdlarson.com/misc/chrome_command_line_flags.html
All four copies of Chromium are running the same version of the software, but they have entirely distinct configurations, cookies, caches, etc.
Part 2 (Jan 2020): Manually installing multiple versions of Chromium from Snap.
Starting with Ubuntu 19.10, Ubuntu now distributes Chromium as a snap package. Ubuntu no longer provides Chromium via .deb
packages.
Consequently, part 3 of this answer is now obsolete. So... below are instructions for manually downloading, manually installing, and manually running Chromium from snap packages.
Warning: The below instructions use snap packages in a way that Ubuntu/Canonical most certainly neither intends nor supports. It is possible that installing Chromium via this method may reduce or compromise Chromium's security. And/or this method may cause other problems. Proceed at your own risk!!
Step 1 - Install prerequisites
$ sudo apt-get install curl jq squashfs-tools
Step 2 - Manually find and download a snap package of Chromium
Download a JSON list of the currently active Chromium packages:
$ curl -H 'Snap-Device-Series: 16' http://api.snapcraft.io/v2/snaps/info/chromium >> chromium.info
View the JSON list to find the URL of the package you want. Note: The JSON list will contain multiple architectures, multiple "risk" levels, and multiple tracks, so be sure to find the right URL.
$ jq . chromium.info | less
Download the snap package of your choice.
$ wget 'https://api.snapcraft.io/api/v1/snaps/download/XKEcBqPM06H1Z7zGOdG5fbICuf8NWK5R_NNN.snap'
Note: Your URL will probably look like the above, but with a specific number rather than NNN
.
Step 3 - Manually extract the snap package
$ unsquashfs KEcBqPM06H1Z7zGOdG5fbICuf8NWK5R_NNN.snap
As of Jan 2020, Chromium uses 149MB of disk space.
Step 4 - Manually run the extracted copy of Chromium
The extracted package will contain both the chromium browser executable and the libraries it uses. In order for the browser to find its libraries, you will need to set the LD_LIBRARY_PATH
variable. If you wish to simultaneously run multiple versions of Chromium, you will need to set LD_LIBRARY_PATH
appropriately prior to running each different version of Chromium. Each version will need to find its libraries, and only its libraries.
$ export LD_LIBRARY_PATH=<full_path_to>/squashfs-root/usr/lib/x86_64-linux-gnu
Note: If your architecture is not x86_64
, then you will need change x86_64
in the above.
Then run chromium:
$ <full_path_to>/squalshfs-root/usr/lib/chromium-browser/chrome
Final thoughts: You may extract the .snap
file wherever you like. You may rename the squashfs-root
directory as you like.
Part 3 (Dec 2016): Manually installing multiple versions of Chromium from .deb packages
Regarding installing different versions of Chrome/Chromium, this appears to be trickier, but perhaps not too tricky. Chromium is launched via /usr/bin/chromium-browser
, which is a shell script. If you look at this script, you see an variable named LIBDIR
. Almost all of the Chromium files are installed inside this directory, so I am hoping that I can manually extract Chromium .deb
files to non-standard locations, and then just tweak this one variable. (Use dpkg
to do the extraction.) Hopefully then I can have different versions installed and running simultaneously. The chromium-browser
shell script even seems to anticipate such a configuration:
LIBDIR=/usr/lib/chromium-browser
# [snip]
readonly UPSTREAM_VERSION="<version>"
if test -x "${LIBDIR}/${UPSTREAM_VERSION}"/chromium-browser; then
LIBDIR="${LIBDIR}/${UPSTREAM_VERSION}"
fi
readonly LIBDIR
Update: After attempting the above, multiple versions of Chromium seem to be working. I have two sets (different versions) of the following packages installed:
chromium-browser
chromium-browser-l10n
chromium-codecs-ffmpeg-extra
The first set is installed by apt-get install
. The section set is installed manually via dpkg -x
in a nonstandard location.
After changing the LIBDIR
variable in the non-standard chromium-browser
script to the appropriate non-standard path, both versions seem to be able to run simultaneously. I am, of course, using a different --user-data-dir
for each version.
if you want a completely separate Google Chrome installed on your machine, including files, document folders, settings, etc. you can check out Containers.
Container is a Virtual-Machine like system that isolates a process (or a set of processes) from the main system.
A set of Docker Container files for Chrome has been developed here to help you get started.
NOTE: This method may not be the easiest, and maybe there's a way easier way to do what you're trying to do.
You can set up multiple users, each with their own profile. And then you can right-click on the current user's name near the top right-corner of your Chrome window to change users (not shown in the image below).
- Download the
deb
package. - Unpack it (
ar xo /path/to/file.deb
) - Unpack the
data.tar.xz
(tar -xvf ...
) - Run
opt/google/chrome/google-chrome
(obviously this bypasses dependency resolution that dpkg, which normally handles deb packages, does. However chances are high, that whatever you have installed for your existing version of Chrome will satisfy the second one too. If not - you can check them in the file control
from control.tar.gz
that resides in the same deb)
-
The question was about multiple versions of Chrome. If I follow your steps, I only get one version of Chrome. Apr 19, 2020 at 7:22