ungoogled-chromium as default daily browser

2020-12-24

(last time edited: 2020-12-29)

tags: internet, browsers

ungoogled-chromium

ungoogled-chromium is a lightweight approach to removing Google web service dependency in the default Chromium browser. It is an alternative to Firefox or big-brand browsers such as Opera, Brave, Iridium, etc.

  1. ungoogled-chromium is Google Chromium, sans dependency on Google web services.
  2. ungoogled-chromium retains the default Chromium experience as closely as possible. Unlike other Chromium forks that have their own visions of a web browser, ungoogled-chromium is essentially a drop-in replacement for Chromium.
  3. ungoogled-chromium features tweaks to enhance privacy, control, and transparency. However, almost all of these features must be manually activated or enabled. For more details, see Feature Overview.

It's been 1 month already that I'm using ungoogled-chromium and I'm very satisfied with it. Updates are at most 2 versions behind from the original Chromium so don't expect high security but it's a good alternative to Firefox for daily browsing. It's stable, fast and doesn't have the eternal Firefox memory leak problem. If you're looking for a secure browser, well, there are too many. Many Firefox forks including IceCat, PaleMoon, Tor Browser and BadWolf, surf, lynx, etc.

So now you might be wondering how to download and use ungoogled-chromium right away. Well, you can build your own binary using this guide or just download the pre-compilled binaries. I honestly prefer the second option, but learning how to compile it could be really interesting. If I do so I'll make sure to document. Remember this project is purely developed and being maintained by people from the FOSS community overall, hobbyists and enthusiasts, etc. Nonetheless I blindly trust more these guys than the big corpo.

Download

Anyways, let's get going. Download the latest tarball and extract it in your home directory.

$ tar -xf ~/Downloads/ungoogled*.tar.xz -C ~

You can execute it using the terminal.

$ ~/./ungoogled*/chrome

Set it up as default browser

And you can also set it up as default browser and add a .desktop entry file in your system as shortcut.

Let's explain some basics here. ~/.local/share/applications is a directory that contains local (not system-wide) .desktop entries. This means only those .desktop files will be shown to that specific user.

I created mine manually. This is what ~/.local/share/applications/ungoogled-chromium.desktop contains:

[Desktop Entry]
Name=ungoogled-chromium
Exec=chrome --disk-cache-dir=/dev/null -disk-cache-size=1 --new-tab %U
Icon=chromium
Type=Application
Terminal=false
Categories=Network;WebBrowser
MimeType=text/html;text/xml;application/xhtml_xml

As you see, this custom .desktop entry will be shown in all different kinds of launchers if they are capable to read local entries. It will work on programs such as jgmenu, rofi, Ulauncher or some forked version of dmenu.

Now we wanna set ungoogled-chromium as default browser, but first we need to tell our shell session where to look for the binary.

Edit or create the ~/.profile file and add the following snippet.

UNGOOGLED_CHROMIUM_DIR="$HOME/ungoogled-chromium_your-version-here_linux"
PATH="$PATH:$UNGOOGLED_CHROMIUM_DIR"

If you re-log into your session you'll be able to execute the chrome binary.

Run this command to double check if the PATH variable was exported correctly.

$ echo $PATH

It should look something like this. Our shell searches for binaries in specific directories in a strict order. /usr/local/bin having first priority, etc.

/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/nbm/ungoogled-chromium_your-version-here_linux

Our last step. We need to figure out which shell program we are using.

$ echo $SHELL

If by any chance your shell is Bash then you'll have to edit ~/.bashrc.

export BROWSER=chrome

Now re-log and that's all you gotta do to set up ungoogled-chromium as default Internet browser.

I also set up default text editor the same way.

export EDITOR=vim

Add extension support

Yeah, you might be wondering how to get back extension support for programs such as uBlock Origin and HTTPS Everywhere.

Thankfully chromium-web-store exists. Someone took the time to make an open source Chrome Web Store plugin with semi-automatic updating.

It's very easy to install, you just need to download the latest .crx file from here.

Change the flag chrome://flags/#extension-mime-request-handling to Always prompt for install and install it by dragging and drop the .crx file into the browser.

Once you do that, you'll be able to use Chrome Web Store normally as if you were using default Chrome or default Chromium.

Happy browsing and Merry Christmas!