Ubuntuzilla firefox on Ubuntu 22.04

Discussion of software apps
Post Reply
User avatar
tlmiller
Posts: 4848
Joined: Tue Jan 16, 2018 12:29 pm
Location: AZ, USA

Ubuntuzilla firefox on Ubuntu 22.04

Post by tlmiller »

So, if you're like me and hate snaps, and also not a big fan of ppa's, then you may decide if you have to run anything Ubuntu 22.04 that you want to add the Ubuntuzilla repos. This is in some ways better than the firefox ppa as if they ever move Thunderbird over to snap, Ubuntuzilla also includes Thunderbird in the repos, along with several other Mozilla packages.

The official Ubuntuzilla instructions use apt-key to import the key, which while it will still work, will generate nasty-grams as it's deprecated and will eventually go away. So here's a script I wrote to install Firefox that uses gpg to import the key from the keyserver, but then export it to a dearmored gpg file and store it like apt wants nowadays. It also will create an /etc/apt/preferences.d/ file to prevent the Ubuntu snap package from installing. I'm not GREAT with keys, so what I'm doing in multiple steps very well may be able to be done in a single step, but it's a functional base to start with if it's something you want to do. It requires bash instead of sh due to using the echo -e option, it can be done in multiple lines if you'd prefer to use sh for it.

Code: Select all

#!/bin/bash

echo "deb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main" > /etc/apt/sources.list.d/ubuntuzilla.list
gpg --keyserver keyserver.ubuntu.com --recv B7B9C16F2667CA5C
gpg --export --armor B7B9C16F2667CA5C > /etc/apt/trusted.gpg.d/ubuntuzilla.asc
gpg --dearmor /etc/apt/trusted.gpg.d/ubuntuzilla.asc
rm /etc/apt/trusted.gpg.d/ubuntuzilla.asc
echo -e "Package: firefox \nPin: release o=ubuntu \nPin-Priority: -10" > /etc/apt/preferences.d/firefox
apt update
apt install firefox-mozilla-build
wove
Posts: 1188
Joined: Mon May 04, 2020 4:47 pm

Re: Ubuntuzilla firefox on Ubuntu 22.04

Post by wove »

I love it when people fix things that bother them. Thanks @tlmiller. I copied the code into my notebook, so I can put it to use.
Post Reply