Installing Google Chrome on Clear Linux*

Some time ago I answered a question about installing Google Chrome on Clear. I’m updating the step by step process using this installation method suggested by @paulcarroty.

Step by step process

  1. Open a terminal

  2. Run the following command to obtain root privileges

    sudo -s
    

    and type your admin password.

  3. Run the following commands, one by one:

    swupd bundle-add package-utils
    curl -LO https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
    rpm -U --nodeps google-chrome*.rpm
    
  4. Now you can delete the .rpm package and, if you don’t need it, the package-utils bundle. To do this run the following commands, one by one:

    rm -f google-chrome*.rpm
    swupd bundle-remove package-utils
    
  5. And the following command will fix the font loading (thanks to @TomL for his workaround):

    f=/etc/environment; s='export FONTCONFIG_PATH=/usr/share/defaults/fonts'; touch $f; if ! grep -q "$s" $f; then echo $s >> $f; fi
    

Done!

Updating Google Chrome

To update Google Chrome you can re-follow the procedure above, or periodically run it in a script.

Uninstalling Google Chrome

  1. Open a terminal

  2. Run the following command to obtain root privileges

    sudo -s
    

    and type your admin password.

  3. Run the following commands, one by one:

    swupd bundle-add package-utils
    rpm -e google-chrome-stable
    
  4. Now if you don’t need it you can delete the package-utils bundle by running:

    swupd bundle-remove package-utils
    

Done!

I noted some errors during the installation that obviously didn’t emerge using rpm2cpio in the previous tutorial, but the browser works anyway. Let me know your thoughts, and if there’s something that can be improved, especially about those errors. I hope it’s helpful! :smile:

8 Likes

To install the first time, the last line of step 3 should read:

rpm -i --nodeps google-chrome*.rpm

(At least, I needed to use -i instead of -U :upside_down_face:)

rpm -U should work for updating later on.

Hi @a-lakhani, welcome to the Clear Linux* Forum! :smile:

That’s strange, I explicitly wrote rpm -U because it’s more generic and works in both cases. I just retried installing Chrome using rpm -U and it “worked”. I get some errors and warning obviously:

# rpm -U --nodeps google-chrome*.rpm
warning: google-chrome-stable_current_x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 7fac5991: NOKEY
/var/tmp/rpm-tmp.khWS37: riga 612: /etc/default/google-chrome: File o directory non esistente
/var/tmp/rpm-tmp.khWS37: riga 615: /etc/default/google-chrome: File o directory non esistente
warning: %post(google-chrome-stable-77.0.3865.90-1.x86_64) scriptlet failed, exit status 1

but — I think — that’s because rpm is not the proper way to install apps on Clear. Those errors shouldn’t compromise the installation and I still found Google Chrome between the installed apps after running the scripts.

Oops! :flushed: I saw “scriptlet failed” and assumed it didn’t “work,” I didn’t actually check if Chrome was in the installed apps after I saw the error.

Thanks for the welcome, I’m sure there will be many more such lessons as I play around with Linux!

1 Like

This worked for me. I had to add/activate a keyring in Seahorse.

But have you seen this:
http://ftp.rpm.org/max-rpm/s1-rpm-install-additional-options.html#S2-RPM-INSTALL-NODEPS
" Whether it will work properly is another matter, but it is installed. In general, it’s not a good idea to use –nodeps to get around dependency problems."

How do you guys get hardware decoding to work on Chrome?

Chrome works well for me out of the box, in comparison to Firefox, it plays videos and GIFs by default. If you are talking about the Accelerated Video Decode feature in chrome://gpu, it’s unavailable on GNU/Linux. Maybe you can find more info here.

I saw answer from a Clear Linux developer that you don’t include Google Chrome as you are not allowed to repackage their binary.
Please add a Google Chromium bundle as so many other distros do https://chromium.googlesource.com/chromium/src/+/master/docs/linux_chromium_packages.md

/Christian

Or even better :

Lighter, more private, and especially… faster !

1 Like

Thanks for sharing this! The portable version of this is perfect for running from a user folder.

1 Like