Way to avoid Snap version of Firefox and continue to use deb-package on freshly installed Ubuntu MATE 21.10

I have just installed fresh Ubuntu MATE 21.10 system offline.

Then I have connected it to the network and ran update-manager manually to check and get some new updates.

It showed a surprise for me - it will remove Firefox deb-package as shown on below screenshot to replace it with Snap:

update-manager is going to remove deb-package of Firefox

This is not acceptable for me, I want to use normal deb-package of Firefox.

This change is caused by Firefox deb → snap transition. The procedure is coded inside update-manager codebase and in /usr/share/ubuntu-release-upgrader/deb2snap.json from ubuntu-release-upgrader-core package.

A way to disable such behavior and continue to use deb-package of Firefox is to mark Firefox package as manually installed by using command below:

sudo apt-mark manual firefox

and then launch update-manager again and get no surprises.

6 Likes

Good workaround but temporary I assume as Canonical are planning to go snap only (will drop the *.deb) for Firefox in the next release.
What will it be then ? PPA ?

1 Like

I have already prepared a draft titled "Ways to avoid Snap version of Firefox web browser". I'll put it below. Currently it is not needed, but let's save it for the near future.

There are signs that modern Ubuntu versions will ship Firefox as a Snap.
Some users will not accept this transition.

So below are three possible alternatives - two deb-packaged and one for local user installation.

At first we need to remove Snap'ed Firefox by command like:

snap remove firefox --purge

then at first try to install Firefox from official repository as simple as sudo apt-get install firefox or alternatival deb-packages (1a and 1b below) or extract local version (2).

1. Firefox or Firefox ESR installed from deb-package using 3rd-party repository

a. deb-packaged Firefox from UbuntuZilla - regular or ESR
Add UbuntuZilla repository with its signing key by

echo "deb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main" | sudo tee -a /etc/apt/sources.list.d/ubuntuzilla.list > /dev/null
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 2667CA5C
sudo apt-get update
sudo apt-get install firefox-mozilla-build

Note: if one needs ESR version - then replace last command with sudo apt-get install firefox-esr-mozilla-build.

Removal is possible by the following commands:

sudo rm /etc/apt/sources.list.d/ubuntuzilla.list
sudo apt-get autoremove --purge '*firefox*'
sudo apt-get update

b. deb packaged Firefox ESR version from Mozilla Team PPA

To get Firefox ESR version installed from Mozilla Team PPA use commands below:

sudo add-apt-repository ppa:mozillateam/ppa
sudo apt-get update
sudo apt-get install firefox-esr

Additional locales may be installed by using packages like firefox-esr-locale-it (example for Italian).

To remove deb-packaged Firefox one can use commands like:

sudo apt-get install ppa-purge
sudo ppa-purge ppa:mozillateam/ppa
sudo apt-get autoremove --purge

2. Locally extracted Firefox archive

If one needs to download and install Firefox to the home folder, then it is possible in the following way:

mkdir ~/Software ~/bin
cd ~/Software
wget -c http://ftp.mozilla.org/pub/firefox/releases/93.0/linux-x86_64/en-US/firefox-93.0.tar.bz2
tar -xf firefox-93.0.tar.bz2
ln -sf /home/$USER/Software/firefox/firefox ~/bin/firefox

# create desktop-file with long command below
mkdir -p ~/.local/share/applications/
cat <<EOF >  ~/.local/share/applications/firefox-user.desktop
#!/usr/bin/env xdg-open
[Desktop Entry]
Encoding=UTF-8
Name=Firefox (local)
GenericName=Browser
Comment=Web Browser
Exec=firefox %u
Icon=/home/$USER/Software/firefox/browser/chrome/icons/default/default48.png
Terminal=false
X-MultipleArgs=false
StartupWMClass=Firefox
Type=Application
Categories=Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;
EOF

update-menus

then logout and login back.

To remove such local installation use commands below:

rm -rf ~/Software/firefox
rm -v ~/.local/share/applications/firefox-user.desktop
rm -v ~/bin/firefox
update-menus

Discussion and notes:

My personal choice will be one of deb-based.
I would prefer ESR (1b) to get my Firefox behavior stable as it is needed for enterprise level application.

4 Likes

I used the UbuntuZilla versions of Firefox, FirefoxESR, Seamonkey and Thunderbird for years with no problems. About the only difference you will notice is it will takes a few days longer for the most current update. A few sites will tell you to update you browser in that short period,

1 Like

While I agree that a proper deb package is the ideal way to go, it's probably worth mentioning that Mozilla already provides distro-agnostic FF builds here.

Obviously that puts the onus on the user to update it each time, which certainly gets old fast, but if the official PPA only provides ESR builds and you're not keen on installing something as impactful as a browser from a random PPA then AFAICT this is the only option there is.

1 Like

ubuntuzilla gives you a repository, not a PPA. It updates automatically:

https://sourceforge.net/p/ubuntuzilla/wiki/Main_Page/#installation

repository:

deb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main

add the repository:

echo -e "\ndeb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main" | sudo tee -a /etc/apt/sources.list > /dev/null

add the key:
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 2667CA5C

sudo apt-get update

Install your desired package, with one of the following commands:

sudo apt-get install firefox-mozilla-build
sudo apt-get install firefox-esr-mozilla-build
sudo apt-get install thunderbird-mozilla-build
sudo apt-get install seamonkey-mozilla-build

1 Like

Downloading Firefox from Mozilla,
Firefox should manage it's own updates automatically.

Hi everyone, many thanks for the information.
If you have tried the Snap version, will this possible transition affect folders .thunderbird and .mozilla, that is, path, configuration and file types? Not clear. Could you more explain in what way? Like others, I make a backup of specific files.
TIA

I also removed the snap firefox as my usual fix to allow touchscreen scrolling in firefox stopped working. I went backt the apt version of firefox so have bought my self at least six months.

My touch screen scrolling fix is to run the command below. I didn't create this fix only picked it up from somewhere. So I couldn't explain how it works.

sudo sed -i "s|Exec=|Exec=env MOZ_USE_XINPUT2=1 |g" /usr/share/applications/firefox.desktop

If you'd actually read the page you linked to, you wouldn't have made that post. :slight_smile:

The test for Firefox from Mozilla should be simple:

  • Download Firefox 92 from Mozilla directory listing
  • Run Firefox, it downloads automatically update 93
  • And after the next start it is updated to Firefox 93

why don't you love Snap?

From DistroWatch
Banner
Snaps

"3Snaps (by [Shawn ]on 2021-10-11 00:58:58 GMT from United States)
I won't use snaps because each installed package has to be mounted as a block device to run. There are as many as 2-3 mounted loop devices for each snap package cluttering up my lsblk and fdisk outputs. How many block devices would you have mounted if the whole system was snaps?"

I agree, I voted "I will continue to avoid snaps". AS you can see 69% voted that, compared to 12% that already use snaps. About 6 to 1 ratio. Make of that what you will.

4 Likes

it doesn't tell me anything. I am using. Snap.

LOL, you are free to use snap. That is what people like about Linux, choice!

3 Likes

been using apt and rpm since 1994 I will not use snap for the pros there are more cons for my use cases. We saw this with yast yast2 and yum ... real old people like me remember pkg add on sun or build it with make then install it via shellscript. New installer systems are nice, but if the advantage is more clutter then it is not an advantage is it?

1 Like

I'm glad I don't have to go back to tar balls. I am not even sure I'd remember what do do with them.

2 Likes

I have been getting more nostalgic now that you mention tarballs :slight_smile: ... you want to have some fun check out tarsnap :slight_smile: tarsnap.com Tarsnap - Design