6

I want to install Chromium from the Linux Mint repositories in Ubuntu 20.04, to avoid snap.

This answer describes how to install Chromium from the Debian repository.

However, the Linux Mint repository usually hosts an updated version of Chromium compared to Debian (as of 12th January 2022, LM 20 repository contains Chromium 97, whereas Debian 11 repository has Chromium 90), and also, Debian security team might soon discontinue maintaining Chromium.

Archisman Panigrahi
  • 28,338
  • 18
  • 105
  • 212

2 Answers2

12

There are a couple of steps required to make this work and, fortunately, it's not too crazy. Here's how you can do this:

  1. Open Terminal (if it's not already open), and remove chromium snap package if you already have not.

    sudo apt purge chromium-browser
    
  2. Create an apt source file for the Mint repository:

    For Ubuntu 20.04:

    echo "deb http://packages.linuxmint.com una upstream" | sudo tee /etc/apt/sources.list.d/mint-una.list
    

    For Ubuntu 22.04 (and newer):

    echo "deb http://packages.linuxmint.com victoria upstream" | sudo tee /etc/apt/sources.list.d/mint-victoria.list
    
  3. To prevent NO_PUBKEY you have to add the GPG key by this:

    sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com A1715D88E1DF1F24 40976EAF437D05B5 3B4FE6ACC0B21F32 A6616109451BBBF2
    
  4. Then update package lists by apt:

    sudo apt update
    
  5. Prevent installation of other packages by pin-file:

    cat <<EOF | sudo tee /etc/apt/preferences.d/pin-chromium
    Package: *
    Pin: release o=linuxmint
    Pin-Priority: -1
    

    Package: chromium Pin: release o=linuxmint Pin-Priority: 1000 EOF

  6. Install chromium:

    sudo apt install chromium
    
  7. Open chromium and check the About: Mint's Chromium in 20.04 Note: You may want to change the landing page, which is all about Mint Una

This will give you what you're looking for

Archisman Panigrahi
  • 28,338
  • 18
  • 105
  • 212
matigo
  • 22,138
  • 7
  • 45
  • 75
  • /etc/apt/sources.d/mint-una.list --- You probably intended to write sources.list.d? – Archisman Panigrahi Jan 12 '22 at 15:14
  • @ArchismanPanigrahi Yep – matigo Jan 12 '22 at 15:17
  • If I do this, would not Ubuntu upgrade all the packages from Linux Mint repo? I want to selectively upgrade chromium. – Archisman Panigrahi Jan 12 '22 at 16:33
  • 4
    I have added the pin-file to prevent other package installation. – N0rbert Jan 12 '22 at 16:36
  • 1
    It works, thanks. – fsevenm Jul 16 '22 at 00:30
  • on the install step, I received this error: "Entpacken von chromium (103.0.5060.134~linuxmint1+una) ... dpkg: Fehler beim Bearbeiten des Archivs /var/cache/apt/archives/chromium_103.0.5060.134~linuxmint1+una_amd64.deb (--unpack): Versuch, »/usr/share/applications/chromium-browser.desktop« zu überschreiben, welches auch in Paket chromium-browser 1:85.0.4183.83 -0ubuntu0.20.04.2 ist Fehler traten auf beim Bearbeiten von: /var/cache/apt/archives/chromium_103.0.5060.134~linuxmint1+una_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)" – Adalbert Hanßen Aug 04 '22 at 13:51
  • Although I had uninstalled the snap-install of Chromium which was present before, a transitional package chromium-browser was left over. This one hovever served gimp-help-en and gimp-help-de which I had to remove fist. After removing chromium-browser I also had to purge it. Then finalla I could sudo apt install chromium. – Adalbert Hanßen Aug 04 '22 at 14:17
  • After doing what I described in the last two comments, Links from LibreOffice documents to websites did not work any longer: I could overcome this by making Chromium the standard browser. - In addition links from Emails received through Thunderbird (TB) could also not be followed by clicking on them or by TB's context menu function follow link. I am still searching for a solution to this issue. – Adalbert Hanßen Aug 05 '22 at 09:00
  • In order that hyperlinks to internet sites e.g. from LibreOfficeWriter documents work, one has to let Chromium be the standard browser. In my case, links from Thunderbird do internet sites don't work any longer despite of this. I asked this question for this special issue in the German forum: https://forum.ubuntuusers.de/topic/hyperlinks-in-chromium-oeffnen/#post-9330420 – Adalbert Hanßen Aug 16 '22 at 20:22
  • Worked perfectly on Ubuntu Server 22.04.3 LTS. – cherouvim Oct 30 '23 at 08:31
0

These directions are not necessarily incorrect. I do recommend using the vanessa repositories though. You can do this by doing the following:

  1. Open a Terminal.

  2. echo "deb http://packages.linuxmint.com vanessa upstream" | sudo tee /etc/apt/sources.list.d/mint-vanessa.list

  3. sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com A1715D88E1DF1F24 40976EAF437D05B5 3B4FE6ACC0B21F32 A6616109451BBBF2

NOTE: These same keys DO work. You may get a slight warning saying "W: http://packages.linuxmint.com/dists/vanessa/Release.gpg: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.", but as you probably know by now "W:" or warning signs aren't a big deal for the most part.

  1. sudo apt update (or "sudo nala update" if you use nala.)

  2. Again... prevent installation of other Linux Mint Repositories' packages by running the code above.

  3. sudo apt install chromium (or "sudo nala install chromium" if you use nala.)

Disclaimer: By using this process, you are pulling chromium as a .deb package. If you ever want to return to the snap format, you can either run the installation via snap or reverse this process.