How to install firefox (non snap)

In light of firefox becoming a snap, i have a tutorial on how to replace the snap version with the version from mozilla’s website.

Note: This involves getting through a little bit of terminal, but we’ll just be copying and pasting commands here. This also works with any Ubuntu flavour.
Precaution: I advice to remove the firefox snap before doing this. Only remove snapd if you don’t want it anymore.

  1. in a terminal, type in sudo snap remove firefox. Type in your password, then wait until the snap is removed.

Now, we can proceed to installing the tar version of firefox! :smile:

  1. Download the tar from the website.

  2. Open a terminal and paste this command:
    cd ~/Downloads

  3. Then extract the contents using this command:
    tar xjf firefox-*.tar.bz2

  4. Apply this command:
    sudo mv firefox /opt.
    You will be asked to enter your password.

  5. Apply this command to make sure firefox is executable:
    sudo ln -s /opt/firefox/firefox /usr/local/bin/firefox

  6. And last but not least apply this command:
    sudo wget https://raw.githubusercontent.com/mozilla/sumo-kb/main/install-firefox-linux/firefox.desktop -P /usr/local/share/applications

  7. And your done :slight_smile:

3 Likes

Thank you @BasilCat! This will be something I will be testing from now on! :slightly_smiling_face:

1 Like

You’re welcome. If you have any questions please ask.
One thing i forgot to mention is that if you don’t use snaps at all, completely uninstall it with:
sudo apt remove snapd
and to prevent it from coming back apply: sudo apt-mark hold snapd.

2 Likes

@BasilCat

This also looks interesting to me . . . long time Firefox user and Lubuntu user . . . . The question is, how important is “snap” to Lubuntu and/or the genral Ubuntu operating system?? They seem to be diving into it with enthusiasm. I personally don’t know what exactly “snap” is, but over the last couple of years I’ve noticed that my Lubuntu install boots more slowly than my SUSE and Debian and Manjaro installs . . . .

Other question, once the Firefox tar is downloaded and installed, will apt be updating that version, or will it revert FF back to the snap version??? Again, I don’t know how “important” snap is to the overall system, to know what “locking” it would do?? Nothing? Or, my Jammy will be lost in the Bermuda Triangle if it doesn’t have snap to show it the way???

The firefox tar does not install updtes from the apt repos or snap store; instead it installs updates from mozilla.
Should you think snap will do anything bad, you can safely use the above commands to remove snapd and banish it.

3 Likes

Thanks for the reply. So, you are saying that once the .tar is installed the future updates would be via mozilla . . . and those would be handled by apt?? Or. no, future updates would be done manually via adding a new .tar download???

And, back to the question on snap . . . why is it among us?? Is there any reason to banish it for good? Or snap is our overly needy friend, it does provide some service, but then takes up resources to do that??

Snap Firefox takes 15 seconds to launch? Its annoying, since I have an nvme SSD. And you can’t install extensions from Mozilla.
Don’t worry, you won’t have to download the tar again and again to update.

2 Likes

Snap is a packaging system, which like everything, has benefits along with it’s ‘drawbacks’.

You can read this old thread which explains why chromium started being changed to a snap, which highlights a huge benefit in that it allows older/newer software than your base Ubuntu system would allow via deb dependencies (ie. avoiding dependency hell).

There are situations where snap packages thrive over the various alternatives (Flatpak, AppImage etc), I’ve even read some express the view that’s not with Desktop apps; but we’re a Ubuntu flavor and thus we’ll provide snap infrastructure (even if we decide not to provide snap packages).

Yes the benefit of snaps containing their dependencies within means they can be somewhat larger than deb packages, but that was dealt with by having them compressed as squashfs files; side effect being their slow to load first time they’re run.

You can view the Lubuntu 22.04 manifest and see what snap packages we include; it’s not many being those necessary for snap to run, and requirements of firefoxitself.

From the current daily of jammy it’s

snap:core20	stable	1405
snap:snapd	stable	15177
snap:firefox	stable/ubuntu-22.04	1232
snap:gnome-3-38-2004	stable/ubuntu-22.04	99
snap:bare	stable	5
snap:gtk-common-themes	stable/ubuntu-22.04	1534

Whilst snap packages don’t have depends requirements like deb packages do by design, they do use extensions, and firefox needs some of these, shown with

guiverc@d960-ubu2:~$   snap info --verbose firefox |grep base:
base:         core20

guiverc@d960-ubu2:~$   grep default-provider /snap/firefox/current/meta/snap.yaml
    default-provider: gnome-3-38-2004
    default-provider: gtk-common-themes

Whether or not snap is for you, only you can decide.

On my boxes that have only 1GB of RAM, I tend to avoid snap packages; but on most machines I find them very useful, even adding it on my Debian desktop (where it’s not included by default) as it saves me time & energy as some apps come easily via snap packages. By disabling snapd you can make the system a little faster to boot/login, but most of us aren’t booting our systems many times per day so that saving isn’t significant (convenience to me is worth those few seconds), but you decide for yourself.

I’ve tested what @BasilCat provided on a fresh Lubuntu 22.04 LTS QA-test install and didn’t have any issues… I didn’t live with it, but I’d not be surprised if the

apt-mark hold snapd

on the removed package would create what I’d call a minefield when your next release-upgrade came due, but it’s changes like that many of us document so we have a list of changes that may trip us when the release-upgrade time comes around.

Summary: snap packages give us another choice, or tool for our toolbox.

3 Likes

One more thing I found out recently is that the Firefox snap and chromium snap theme better than the flatpak.

@guiverc H’mm, that’s a good point. That’s why I put a precaution that only remove snapd if you don’t need it anymore. But you’re right, the boot time added by snap is negligible.
Also, Mozilla asked for the change, so I don’t know why people are throwing a fit and saying they are moving to another distro.

3 Likes

@Chris:

Thanks for the thorough explanation . . . like all things, each has their cost/benefit ratio . . . . I’m essentially an end-user, but I like to stay up with the newest releases . . . on a number of OSs. So that means I don’t get under the hood much on any one of them, unless something breaks . . . .

So far, other than longer boot time for Jammy compared to my other systems, I can’t say it’s broke . . . . I don’t mind testing stuff out, to keep it amusing, but then, there’s always another release or upgrade coming down the pike, etc. Tempus fugit and so forth.

3 Likes

I do agree with you. Jammy is mostly fine, but i don’t notice a long boot time. Everything has to giveth and taketh…

Of course you can.

2022-04-20_12-43

That’s an extension installed in the Snap version of Firefox.

1 Like

Yes, but certain extensions like keypass and video download helper don’t work because of no native messaging protocol.

That’s a far cry from the statement you made.

I’ve never tried any of those - but you might want to see if there’s a permissions issue? I really don’t know. But, yeah, you can install (and have work) extensions. If a few specific ones don’t work, look for alternatives until everything is sorted out. (Or just use regular Firefox.)

Yeah, that’s what I’m doing right now, using the regular Mozilla version.

I don’t normally use Firefox, but I’ll try to get some time in the next day or three to see if I can make one or both of those extensions work. I’m a bit bandwidth constrained for the foreseeable future, so it’ll be a minute. You can actually change Snap permissions so there might be something there.

1 Like

Mozilla have acknowledged a number of bugs are reported in the firefox snap package, and have given assurances they’ll get fixed asap; though did say many will be corrected post-release date for Ubuntu 22.04 LTS.

5 Likes

As a Lubuntu Council member I would like to address a few things above.

The question is, how important is “snap” to Lubuntu and/or the genral Ubuntu operating system?? They seem to be diving into it with enthusiasm

@guiverc addressed what the snap packaging system is but I would like to address the “how important” part of this from a Lubuntu standpoint. The system and configuration we ship is what we feel comfortable to support either directly or with upstream Ubuntu help. One of the great things about Ubuntu (and Linux/open source based things) is there is a great deal of choice in what you can do with it after. There is complete control to do what you want. We (the Lubuntu Team) are far too small to account for every variable which is why our team needs to stick to supporting what we offer out of the box. It isn’t that we won’t try to help you should you choose to go your own path but we only have a limited amount of time and knowledge so in some regards you are on your own.

All of that being said, the decision to switch to the Firefox snap was not necessarily the Lubuntu Team’s preference, this is the first snap we have shipped by default. As I previously mentioned we are a small team and can not support our own browser, thus we look to our upstream offerings. We could have chosen Falkon, as that is still in the Ubuntu repositories and is now seeing some regular releases from the upstream developers. I would actually suggest that as a possible alternative or secondary browser option. It does have limitations though, extension support is one of the areas. In addition, DRM online video is another area. If those things don’t matter too much to you, it is a great choice. Ultimately we went with Firefox as a snap because we feel it offers the most functionality and will give (generally speaking) the most complete browser experience.

Snap Firefox takes 15 seconds to launch? Its annoying, since I have an nvme SSD.

It is true that the first time Firefox is loaded in your current session it takes more time and it is annoying. That being said, it only happens on first load, after that it takes the same time as the other package formats. I (and this is me speaking, not the council) find it a strange thing to get hung up on since it is a one time thing.

I’ve noticed that my Lubuntu install boots more slowly than my SUSE and Debian and Manjaro installs

I will reiterate here that this is not Firefox nor the snap backend causing this. There could be a number of possible explanations but we should probably split this off into a separate thread so that it doesn’t get confused with this topic if you felt the need to explore it further.

though did say many will be corrected post-release date for Ubuntu 22.04 LTS.

And here is one of the biggest benefits of snap packaging, the updates. Updates happen in the background without having to think about it. They are able to deliver all of the necessary libraries and dependencies alongside without impacting other packages too.

certain extensions like keypass and video download helper don’t work

Honestly this limitation is another benefit because it means that malicious extensions can’t get added too. Security confinement in a web browser is a direction that things need to go. Most bad stuff comes from the Internet and in general, the browser is the vehicle to deliver it. While not convenient, it is more secure. I’ll take security over convenience any day. As pointed out earlier by @KGIII extensions do work on the snap. I have Ublock and Bitwarden installed, both work as they do/did on the native package.

8 Likes

Update: I notice that the snap firefox now takes 7 seconds to launch. I think it is a big improvement from 15 seconds.

3 Likes