Installing Brave Browser on Clear Linux*

Some time ago I answered a question about installing Brave Browser 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
    dnf config-manager --add-repo https://brave-browser-rpm-release.s3.brave.com/x86_64/
    rpm --import https://brave-browser-rpm-release.s3.brave.com/brave-core.asc
    dnf download brave-keyring brave-browser
    rpm -U --nodeps brave-keyring*.rpm brave-browser*.rpm
    
  4. Now you can delete the .rpm packages and, if you don’t need it, the package-utils bundle. To do this run the following commands, one by one:

    rm -f brave-*.rpm
    swupd bundle-remove package-utils
    
  5. Now we can fix the missing menu icon (thanks to @mattyjones for pointing this out):

    sed -i 's/Icon=brave-browser/Icon=brave/g' /usr/share/applications/brave-browser.desktop 
    
  6. 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 Brave Browser

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

Uninstalling Brave browser

  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 brave-browser brave-keyring
    
  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:

4 Likes

I am facing font loading problem even after executing the command sed -i 's/Icon=brave-browser/Icon=brave/g' /usr/share/applications/brave-browser.desktop and rebooted it.

@MattiaVerticchio, @TomL, are you facing the problem with the latest Clear Linux release?