I’ve been annoyed with the direction Firefox is going for several years now. Luckily there’s Librewolf, which is a Firefox fork, but with saner settings.
Yet, even before Librewolf was already a thing, I knew about another Firefox fork which seemed like a good replacement to me, namely Abrowser. It’s part of the Trisquel project, which is an Ubuntu based distro recognised as a fully free OS by the Free Software Foundation.
The problem I had, is that I didn’t find instructions on how to install it on a Debian-based distro other than Trisquel. Neither was I able to simply find and install it from the default packages in Debian or Ubuntu. Over time I became more knowledgeable and recently I figured out how to do it in a way that seems proper to me.
Apt is the command line tool for installing and maintaining your packages (the things that install and update your sofwtare) on Debian and Debian derived distro’s. Most people who run such a distro and aren’t afraid to get in the terminal from time to time, will probably know the commands
apt upgrade and
apt install <package_name>.
Apt can look online for packages and what versions are available and keeps a local cache. To update the local cache, you do
apt update. The other two commands are for upgrading all packages to the latest version and for installing or upgrading a specific package.
A first question is, how does it know where to fetch the packages. There’s a file
/etc/apt/sources.list. Here you’ll find lines containing an url and some parameters. This is what tells apt where to look for the packages. There’s also a folder
/etc/apt/sources.list.d. This folder can contain multiple files each of them having similar lines. Apt will use the file
/etc/apt/sources.list as well as the content of the files in
/etc/apt/sources.list.d to see where it needs to fetch things.
The content of the source.list for Trisquel is specific to Trisquel. Therefor it’s possible it has packages Ubuntu doesn’t have and vice-versa.
When we fetch packages, we need to be sure the packages and lists are really from the maintainers of the packages. For this reason, the packages are signed. For each source, you need a public key. Apt can then check if the packages it tries to update are signed with the corresponding private key. If so, we expect the packages to not be tampered with.
It stands to reason that Trisquel has different keys than the Ubuntu packages.
Now that we know this, we can already guess how to get Abrowser on Ubuntu through apt. We add the source list, add the keys, and done, right? Well… not entirely. The problem is that Trisquel has many packages that Ubuntu also has, but some of them may have been altered in some way. If we just add the source lists and then upgrade our system, there’s a good change you’ll get incompatibilities because apt may install certain packages from the Trisquel repo’s, while everything on your system is set up for an Ubuntu system.
Luckily there’s a way around that. Apt has something called priorities. In general you won’t need this, but in this case, it’s very helpful. When apt sees several candidates (you can see the candidates for a specific package with
apt policy <package_name>), it will take the one with the highest priority. When there are several candidates with the same priority, it will take the most recent version. By default, the lowest priority a package has is 100. So if we can set the priority of our Triquel packages to a lower priority, it shouldn’t interfere with our system, while still allowing us to install Trisquel specific packages.
First we need root access. You can use
sudo in front of the commands, or simply become root with
sudo -i. Just to be sure, you may want to do
apt update && apt upgrade. Or at least do
apt update and see how many packages can be upgraded.
Then we’ll add the Trisquel source.list. Make sure to add the correct version. I have Ubuntu Focal, so I added the Trisquel source.list for Trisquel Nabia because Nabia is based on Focal. We create a file using
nano /etc/apt/sources.list.d/trisquel.list and give it the following content
deb http://archive.trisquel.org/trisquel nabia main #deb-src http://archive.trisquel.org/trisquel nabia main deb http://archive.trisquel.org/trisquel nabia-updates main #deb-src http://archive.trisquel.org/trisquel nabia main deb http://archive.trisquel.org/trisquel nabia-security main #deb-src http://archive.trisquel.org/trisquel nabia main deb http://archive.trisquel.org/trisquel nabia-backports main #deb-src http://archive.trisquel.org/trisquel nabia main
Then you can save the file and close nano with
Alright! Now we’ll set the priority. Create a file using
nano /etc/apt/preferences.d/trisquel with the following content and save and close again with
CTRL+X. (If you want to know more about these priorities, you can check
Package: * Pin: origin archive.trisquel.org Pin-Priority: 50
Now we’ll add the keys. To find the keys, I looked online in a search engine and easily found the url to download the keys. In this case the url was https://archive.trisquel.info/trisquel/trisquel-archive-signkey.gpg, so I run
wget -qO- https://archive.trisquel.info/trisquel/trisquel-archive-signkey.gpg | apt-key --keyring /etc/apt/trusted.gpg.d/trisquel-archive.gpg add -.
Alright! Now everything is set up. Apt can now also fetch from the Trisquel list of packages, check their integrity, and will still give priority to Ubuntu’s own packages. Let’s do it!
apt update. In the output you should see that it now also fetches from the Trisquel repositories. It shouldn’t want to upgrade more packages than before we started this. If it does, then maybe something went wrong when setting the priority (or an update for some package just became available between the time you last checked and now).
Now you can install Abrowser with
apt install abrowser, and you’re done!
To revert this, you can first uninstall abrowser with
apt remove abrowser (or even
apt purge abrowser, which will remove some config files as well). Just to be sure, you can also see if you have other packages installed from the Trisquel source list. You can list all installed packages and their possible sources with
apt list --installed. So if we want the installed packages that can be installed from Trisquel, but not Ubuntu, we can do
apt list --installed | grep nabia | grep -v focal. If you see more than just abrowser, you’ll have to decide how to deal with them. (Maybe you need to remove them as well, maybe you have other sources they are installed from…)
Then delete the Trisquel source.list with
You can also remove the priority file with
rm /etc/apt/preferences.d/trisquel and the keys with
There’s some danger when mixing sources from different distro’s, but thanks to apt having the concept of priorities, risk is really manageable and it’s not that hard either. This also allows you to install other software in a similar way. Just note that packages have dependencies and it’s not always certain that these can be installed without conflict. For Abrowser it seemed to work, so I guess it’s at least worth trying if you have similar problems.