Linux Mint 20 Snap restrictions and How To Install Chromium Browser In a Snap ... Or Not

wizardfromoz

Administrator
Staff member
Gold Supporter
Joined
Apr 30, 2017
Messages
10,740
Reaction score
9,644
Credits
50,724
Wizard’s Glossary

Clem – Clement Lefebvre, Founder, CEO & Project Manager, Linux Mint
PPA – Personal Package Archive


Many will be aware that Clement Lefebvre’s team at Linux Mint released version 20 10 days or so ago.

What you may not be aware of is that with its release, Clem and his team have renounced the use of Snap, where Snap is an application package deployment solution that works in the same manner across the board with all Linux Distributions (distros).

Snap and the Snap Store are the product of Canonical, the company founded by Mark Shuttleworth and maker of Ubuntu, upon which Linux Mint and many other distros, is based.

My good friend and fellow Aussie Brian @Condobloke has a Thread on the ethical implications of Ubuntu's vision for and implementation of, Snap. That thread is pinned (a sticky) along with this one, and makes for good reading, IMO. If you want to link to it

https://linux.org/threads/linux-mint-20-will-block-ubuntu-snap-by-default.29493/

More background for Clem’s decision can be read with the Recommended Reading, but for now, how does this decision affect us, the Users?

WEB BROWSERS

My web browsers of choice are Firefox and Waterfox (with Waterfox in the ascendancy) but for my own learning, and to help out at this wonderful community, I usually also install Brave and Chromium, and occasionally another one or two.

Since September/October last year, Canonical stopped making Chromium available through the apt package management system, and shipping it in the Snap format, where snapd was automatically installed as part of the process, if it was not already installed.

Linux Mint and others get their Chromium through the Ubuntu repositories, so that automatically rippled through to those distros.

With Linux Mint 20, Clem has placed a restrictive file which effectively bars the use of snaps by default – not just that for Chromium, but all snaps.

That file is called

nosnap.pref

and its path is

/etc/apt/preferences.d/nosnap.pref

Its content is

# To prevent repository packages from triggering the installation of Snap,
# this file forbids snapd from being installed by APT.
# For more information: https://linuxmint-user-guide.readthedocs.io/en/latest/snap.html

Package: snapd
Pin: release a=*
Pin-Priority: -10


In my next Post on the subject, I will be showing you two ways to get around this restriction and to install Chromium.

Cheers

Wizard
 


Thanks for the heads up "Hornet" :)

I have the rest of my Posting done up in Libre Office and will transport it here on my tomorrow.

Cheers

Wiz
 
There is more info on bypassing snap every day, while keeping chromium in the mix.

Like this ...
 
2 METHODS TO INSTALL CHROMIUM ON YOUR MINT

Wizard's Recommended Reading


https://linuxmint-user-guide.readthedocs.io/en/latest/snap.html

A Google search on

install chromium snap

Also,

https://linuxmint-user-guide.readthedocs.io/en/latest/chromium.html

https://snapcraft.io/install/chromium/mint

https://launchpad.net/~saiarcot895/+archive/ubuntu/chromium-beta

HISTORICALLY INSTALLING CHROMIUM

In Ubuntu and Linux Mint and the like, the package has been called

chromium-browser

whereas when using snap to install it is just plain

chromium

TEST ENVIRONMENT

Initially, I had installed Linux Mint 20 Cinnamon, and, having read Brian’s article, had planned to install Chromium via snap, and then to remove it via Timeshift, followed with installing via the PPA recommended in the reading material.

I decided against this approach, as I wanted to establish over a longer period how each method applies updates, so I installed an additional ‘Ulyana’ (codename for LM 20) in the form of Linux Mint 20 MATE, and opted to install one method for each.


METHOD 1 – SNAP ON THE CINNAMON ENVIRONMENT

PREPARATION


In the recommended reading, first link

https://linuxmint-user-guide.readthedocs.io/en/latest/snap.html

Clem’s people advise removing the file which inhibits use of snaps

/etc/apt/preferences.d/nosnap.pref

… but I don’t subscribe to that, as you will likely forget the content of the file and its name should you later wish to stop using snaps.

Instead, I use the move command to move/copy the file content, giving it a related name but with no .pref on the end to cause Mint to read it. See below commands.

Snap method commands and output. Use the commands right of the $ sign:

chris@Ulyana-Cinnamon-SSD:~$ cd /etc/apt/preferences.d/
chris@Ulyana-Cinnamon-SSD:/etc/apt/preferences.d$ ls
nosnap.pref official-package-repositories.pref
official-extra-repositories.pref
chris@Ulyana-Cinnamon-SSD:/etc/apt/preferences.d$ sudo mv nosnap.pref save.nosnap.pref.save
[sudo] password for chris:
chris@Ulyana-Cinnamon-SSD:/etc/apt/preferences.d$ ls
official-extra-repositories.pref save.nosnap.pref.save
official-package-repositories.pref
chris@Ulyana-Cinnamon-SSD:/etc/apt/preferences.d$ cd ~
chris@Ulyana-Cinnamon-SSD:~$ sudo apt update
# Output follows, when it is completed, continue with


chris@Ulyana-Cinnamon-SSD:~$ sudo apt install snapd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
snapd

Need to get 0 B/23.2 MB of archives.
After this operation, 105 MB of additional disk space will be used.
Selecting previously unselected package snapd.
(Reading database ... 333433 files and directories currently installed.)
Preparing to unpack .../snapd_2.44.3+20.04_amd64.deb ...
# More output follows here, when it is completed, continue with
chris@Ulyana-Cinnamon-SSD:~$ sudo snap install chromium
# This will take a few minutes, with outputs punctuated with progress indicators. It concludes with
2020-07-05T09:40:36+10:00 INFO Waiting for restart...
chromium 83.0.4103.116 from Canonical✓ installed
chris@Ulyana-Cinnamon-SSD:~$

In my case, installing by this method, I had to reboot before Chromium appeared in my Menu under Internet.

METHOD 2 – PPA ON THE MATE ENVIRONMENT

PREPARATION


My preparation here involves researching the maintainer of the PPA, which was brought to our attention with recommended reading link

https://linuxmint-user-guide.readthedocs.io/en/latest/chromium.html

Scroll to the part

Unofficial repositories and PPAs
And read the section on Saikrishna Arcot aka saiarcot.

I use PPAs, but only if I know something about the Maintainer’s credentials.

I Googled saikrishna arcot

and learned that he is active in both Ubuntu’s Launchpad, and in GitHub.

At GitHub

https://github.com/saiarcot895

we can see he has 63 projects just in the last 12 months, and I found further he has been actively involved for at least 7 – 8 years.

So I ran my obligatory on demand full screenshot of Ulyana MATE, using Timeshift, and went ahead.

In the following, I use Nano as a text editor from the console. If you are not comfortable with console-based text editors such as nano, vi, vim &c, you may choose a GUI-based text editor. For Mint this is xed. You will need to use it with administrative privileges to create and save some of the files.

For those using Nano for the first time I have one American and one British vid you can look at here


and


which may assist. Also see Notes attached below before proceeding.

PPA method commands and output. Use the commands right of the $ sign:

chris@Ulyana-MATE-SSD:~$ sudo nano /etc/apt/preferences.d/saiarcot895-chromium-beta.pref
[sudo] password for chris:

# and enter (with enter between lines), including the hashed description


# Ensure packages from saiarcot895-chromium-beta PPA have priority
Package: *
Pin: release o=LP-PPA-saiarcot895-chromium-beta
Pin-Priority: 800

# exit and save the file, then continue with


sudo add-apt-repository ppa:saiarcot895/chromium-beta

#you will get a lot of output, from the recommended reading, and at finish

Press Enter to continue or Ctrl+C to cancel

Executing: /tmp/apt-key-gpghome.XdgBpO7mCn/gpg.1.sh --keyserver hkps://keyserver.ubuntu.com:443 --recv-keys E6200BDA4A746F2A1F7FFD3FE6A17451DC058F40
gpg: key E6A17451DC058F40: "Launchpad PPA for Saikrishna Arcot" not changed
gpg: Total number processed: 1
gpg: unchanged: 1
chris@Ulyana-MATE-SSD:~$

Now that you have Sai’s PPA installed, go with the following

chris@Ulyana-MATE-SSD:~$ sudo apt update
# you may get quite a few lines of output. Then continue with

sudo apt install chromium-browser

# I get the following

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
chromium-browser-l10n libpipewire-0.2-1
Suggested packages:
webaccounts-chromium-extension unity-chromium-extension chromiumflashplugin
The following NEW packages will be installed:
chromium-browser chromium-browser-l10n libpipewire-0.2-1
0 to upgrade, 3 to newly install, 0 to remove and 11 not to upgrade.
Need to get 76.0 MB of archives.
After this operation, 299 MB of additional disk space will be used.
Do you want to continue? [Y/n]

# press Y to continue, the result should be (click to open or close the Spoiler)

Get:1 http://ppa.launchpad.net/saiarcot895/chromium-beta/ubuntu focal/main amd64 chromium-browser amd64 83.0.4103.44-0ubuntu1~ppa1~20.04.1 [72.4 MB]
Get:2 http://mirror.aarnet.edu.au/pub/ubuntu/archive focal/universe amd64 libpipewire-0.2-1 amd64 0.2.7-1 [89.6 kB]
Get:3 http://ppa.launchpad.net/saiarcot895/chromium-beta/ubuntu focal/main amd64 chromium-browser-l10n all 83.0.4103.44-0ubuntu1~ppa1~20.04.1 [3,544 kB]
Fetched 76.0 MB in 1min 15s (1,016 kB/s)
Selecting previously unselected package libpipewire-0.2-1:amd64.
(Reading database ... 383442 files and directories currently installed.)
Preparing to unpack .../libpipewire-0.2-1_0.2.7-1_amd64.deb ...
Unpacking libpipewire-0.2-1:amd64 (0.2.7-1) ...
Selecting previously unselected package chromium-browser.
Preparing to unpack .../chromium-browser_83.0.4103.44-0ubuntu1~ppa1~20.04.1_amd6
4.deb ...
Unpacking chromium-browser (83.0.4103.44-0ubuntu1~ppa1~20.04.1) ...
Selecting previously unselected package chromium-browser-l10n.
Preparing to unpack .../chromium-browser-l10n_83.0.4103.44-0ubuntu1~ppa1~20.04.1
_all.deb ...
Unpacking chromium-browser-l10n (83.0.4103.44-0ubuntu1~ppa1~20.04.1) ...
Setting up libpipewire-0.2-1:amd64 (0.2.7-1) ...
Setting up chromium-browser (83.0.4103.44-0ubuntu1~ppa1~20.04.1) ...
Setting up chromium-browser-l10n (83.0.4103.44-0ubuntu1~ppa1~20.04.1) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for libc-bin (2.31-0ubuntu9) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for desktop-file-utils (0.24+linuxmint1) ...
chris@Ulyana-MATE-SSD:~$

If you have followed all the above successfully, you should now have Chromium installed. In this instance, it appears immediately in your Menu, under Internet.

NOTES TO THE ABOVE

Both in the output generated with the install methods, and with the recommended reading references I have provided there is mention of

  1. Additional packages you might wish to install and
  2. Additional procedures you may wish to follow should you wish to be sure of being able to access certain videos, Netflix &c. I don’t use Netflix so I can’t help you further there.

Chromium has, in place of a hamburger menu for settings, 3 vertical dots near top right, and Help – About reveals that the versions of Chromium resulting from my install are as follows:

For the snap method on my Cinnamon

Version 83.0.4103.116 (Official Build) snap (64-bit)

and for the MATE with its PPA method

Version 83.0.4103.44 (Developer Build) Built on Ubuntu 20.04, running on LinuxMint 20 (64-bit)

So only slight differences between the two, and I chose the beta version over the dev version with the PPA.

With the snap version, on Cinnamon, I will be leaving the re-named and moved .pref file as it is for now, as I want to establish details of updates.

If you wish to keep out the snaps, you can simply reverse the file naming with the “sudo mv” file command I gave earlier, but I am not aware if that will affect updates by snap.

I have also yet to determine if, when you internally upgrade your Linux Mint from eg 18.x to 20, what happens with snap support.

When I learn any of this, I will report back.

Good luck with your choices.

Wizard
 
There is more info on bypassing snap every day, while keeping chromium in the mix.

Yes, thanks, I journeyed through that one in my travels. :)

Wizard
 
That's why the use of snaps is a poor implementation of the whole idea of containerization. You (the unsuspecting user) end up with too many tiny, uncoordinated containers. Inefficient and ineffective in so many ways.
 
I know this is about installing chromium using snap, however, I'd like to add that if for any reason someone is reluctant to use snap they can install it by following instructions from here too https://ubuntu.pkgs.org/20.04/ubunt..._83.0.4103.97-0ubuntu0.20.04.1_amd64.deb.html

Sorry, Hornet - they can't. :(

If you download the .deb residing there, it will download a file

chromium-browser_83.0.4103.97-0ubuntu0.20.04.1_amd64.deb

about 48.5 kB in size, clearly not large enough to install Chromium by itself.

If you invoke

sudo dpkg -i chromium-browser_83.0.4103.97-0ubuntu0.20.04.1_amd64.deb

on it, or use GDebi, you will get (I used dpkg)

Selecting previously unselected package chromium-browser.
dpkg: regarding chromium-browser_83.0.4103.97-0ubuntu0.20.04.1_amd64.deb containing chromium-browser, pre-dependency problem:
chromium-browser pre-depends on snapd
snapd is not installed.

dpkg: error processing archive chromium-browser_83.0.4103.97-0ubuntu0.20.04.1_amd64.deb (--install):
pre-dependency problem - not installing chromium-browser
Errors were encountered while processing:
chromium-browser_83.0.4103.97-0ubuntu0.20.04.1_amd64.deb

So if you then install snapd, and re-run the commands, it flips through to snapd and installs Chromium via snap.

That, in turn, is in accord with what Darren has subsequently said at #7.

See what you mean about the snap dependency looked all the versions on pkgs.org. Not good, not good at all.

Cheers

Wizard
 
Sorry, Hornet - they can't. :(

If you download the .deb residing there, it will download a file

chromium-browser_83.0.4103.97-0ubuntu0.20.04.1_amd64.deb

about 48.5 kB in size, clearly not large enough to install Chromium by itself.

If you invoke

sudo dpkg -i chromium-browser_83.0.4103.97-0ubuntu0.20.04.1_amd64.deb

on it, or use GDebi, you will get (I used dpkg)

Well, I meant to follow these instructions
Install Howto
1. Add the following line to /etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu/ focal-proposed universe
2. Update the package index:# sudo apt-get update
3. Install chromium-browser deb package:# sudo apt-get install chromium-browser

Which according to that
Do not attempt to install the snap on systems where snapd isn't running
(including chroots and WSL) (LP: #1882232)

If I understand correctly the above, adding the focal-proposed repo will not install snap, I might be wrong though.

For dependencies is better to install the .deb pkg with
Code:
 sudo apt install ./pkg_name.deb
which takes care of list, download and install any dependences for you. I'm going to try this in a VM and see how that goes.

Also, I found this http://ubuntuhandbook.org/index.php/2020/06/install-chromium-via-deb-ubuntu-20-04/ and in one comment someone said:
Thanks. This installed nicely and appears to be fully functional on Mint 20 Cinnamon, based on Ubuntu 20.04.

By the way, great work on this post and nice tutorial! :)
 
Last edited:
I'm going to try this in a VM and see how that goes.

If you haven't already done that, or even if you have, you will likely find the same as I.

I have used my Linux Lite 5.0 (UEFI) in this instance, as it is built on Ubuntu 20.04 'Focal Fossa'.

I added to my /etc/apt/sources.list the following two lines

# Below added for Chromium experiment 200710
deb http://archive.ubuntu.com/ubuntu/ focal-proposed universe

then run the commands as you listed, partial output is below, and I have highlighted some relevant part

Code:
sudo apt-get -y install chromium-browser
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following additional packages will be installed:
  snapd
The following NEW packages will be installed:
  chromium-browser snapd
0 to upgrade, 2 to newly install, 0 to remove and 1 not to upgrade.
Need to get 27.3 MB of archives.
After this operation, 120 MB of additional disk space will be used.
Get:1 http://mirror.aarnet.edu.au/pub/ubuntu/archive focal-updates/main amd64 snapd amd64 2.45.1+20.04 [27.3 MB]
Get:2 http://mirror.aarnet.edu.au/pub/ubuntu/archive focal-updates/universe amd64 chromium-browser amd64 83.0.4103.97-0ubuntu0.20.04.1 [48.5 kB]
Fetched 27.3 MB in 1min 39s (276 kB/s)                                        
Preconfiguring packages ...

So you can see that Ubuntu has this snap business stitched up, and all roads lead to snap unless you use the PPA from Sai Arcot.

Cheers

Wiz

Edited added BTW

BTW highlighting not available in Code, so look for

The following additional packages will be installed:
snapd
The following NEW packages will be installed:

chromium-browser snapd
 
So you can see that Ubuntu has this snap business stitched up, and all roads lead to snap unless you use the PPA from Sai Arcot.

.....and that is the whole situation in a nutshell !!!!!!!!!!!!!!
 
Last edited:
So you can see that Ubuntu has this snap business stitched up, and all roads lead to snap unless you use the PPA from Sai Arcot.
Oh well, that saves me the trouble of trying this :p Flatpack, snap, appimage (the lesser evil, imo), nix, guix and who knows what else is out there awaiting to be summoned as the next "package management revolutionary approach/method/technology to be used" instead of the old-good-foolproof-reliable ones already available. I'm afraid we might sometime not far enough be back to the "build yourself" days
Code:
./configure
make
make install

Pixel Shading graphics language has been stuck on version 3.30 on the open source drivers for I don't how long but it's been years and last I checked the current version was 5.0 (yep, just googled it and it is still 5.0), which my amd GPU happens to be capable of handling, unfortunately there's no propietary driver support - well, there is but is a pain installing it and I rather not - in Linux which does support such language. I know it's not the devs to blame but mainly manufacturers who refuse to free their code for this to happen, still, I wonder if they actually try and look for a way to achieve this instead of just asking/expecting people having to upgrade their hardware in order to use such technologies which may significantly improve the way they use their pcs and systems. Same with all this "new package management" thing which IMO makes no sense at all and in fact creates more problems than it solves. Improve the ones people already use and stop changing the questions we already know the answers (the best and right ones) for!
 
Nice rant ;), very true.

Avagudweegend all.

BTW I have installed a 3rd LM 20, in the form of Xfce, and run a variation of the above methods described, in that I
  • renamed Clem's nosnap.pref file
  • installed snapd
  • installed Chromium via snap, and then
  • restored Clem's file
I'll report back on that when I have news.

Wizard
 
@wizardfromoz the method described here http://ubuntuhandbook.org/index.php/2020/06/install-chromium-via-deb-ubuntu-20-04/ works, well at least it does in Ubuntu 20.04 and since Mint 20 is based off that one I guess it should work too and in fact someone in the comments said:
.
Thanks. This installed nicely and appears to be fully functional on Mint 20 Cinnamon, based on Ubuntu 20.04.

Here's how to:
1. - add the following repository chromium-deb-vaapi to your system
Code:
sudo add-apt-repository ppa:xalt7x/chromium-deb-vaapi
if you get command not found you might need to install and additional pkg
Code:
sudo apt-get install software-properties-common
once that's installed try to add the PPA again and after doing so update sources
Code:
sudo apt-get update
.
2.- When adding the PPA you'll see a message advising you to PIN chromium, copy/paste that command in the terminal and excecute it, that is; hit Enter and type in your password when asked
Code:
cat <<EOF | sudo tee /etc/apt/preferences.d/pin-xalt7x-chromium-deb-vaapi
Package: *
Pin: release o=LP-PPA-xalt7x-chromium-deb-vaapi
Pin-Priority: 1337
EOF
3. - Install chromium
Code:
sudo apt-get install chromium-browser
Well, that's pretty much it :)

Some screenshots:

chromium.png

chromium1.png

chromium2.png

chromium3.png

chromium4.png
 
Last edited:
@Lord Boltar , not sure of the relevance.

This Thread is about installing Chromium Browser, not Google Chrome :)

Wiz
 

Members online


Latest posts

Top