26

I'm using Firefox 96.0 on Kubuntu (96.0+build2-0ubuntu0.21.10.1)

Sometimes, firefox updates in the background and then comes up with a message "Sorry. We just need to do one small thing to keep going.". I then can no longer do anything at all in Firefox until I restart - not open any new tabs nor use links in current tabs. This has cost me money as I have had this occur once while booking train tickets - after restart the ticket was no longer available at the offered price.

In settings, there is no option to warn about updates but wait to install them after the update: under Firefox settings/General/Firefox Updates I see

Keep Firefox up to date for the best performance, stability, and security.
Version 96.0 (64-bit) What’s new
Mozilla Firefox for Ubuntu
Canonical - 1.0

Without any option to change anything. Whenever I google I see many hints on how to disable updates for 7x-version numbers, and many people ask to disable updates altogether, which is not what I want.

Is there a way to let Firefox warn me (and this is ok to nag) to install updates ASAP but let me decide when?

IIVQ
  • 361
  • 5
    I doubt it. FF in Ubuntu is updated the same way as other packages, either through apt or snap. Its own update service is removed. – mikewhatever Jan 14 '22 at 11:36
  • 1
    Please see my answer here: https://superuser.com/questions/1370165/disable-or-control-upgrading-of-firefox/1618013#1618013 – raj Jan 14 '22 at 12:10

7 Answers7

11

This answer is about turning off automatic updates. It does not notify you before the update.


Replace the snap version of firefox with the apt version. It would only update when you update the rest of the packages.

(For Ubuntu 22.04 and above, see this answer to install the pure apt version of Firefox.)

sudo snap remove firefox
sudo apt install firefox

Make sure to turn off automatic updates in the Software & Updates settings.

automatic update

However, make sure to manually apply updates in a regular basis.

Archisman Panigrahi
  • 28,338
  • 18
  • 105
  • 212
  • Thanks, but I have the apt version of firefox. Firefox still updates in the background.

    :~$ sudo snap remove firefox snap "firefox" is not installed :~$ sudo apt install firefox Reading package lists... Done Building dependency tree... Done Reading state information... Done firefox is already the newest version (96.0+build2-0ubuntu0.21.10.1). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

    – IIVQ Jan 14 '22 at 13:14
  • 1
    @IIVQ Please check the edited answer. – Archisman Panigrahi Jan 14 '22 at 15:07
  • You cannot control the 'updates' notification if you are using unattended upgrades or just 'installing' the updates when the system says you have updates. You need to start auditing your updates lists before approving them blindly for installation. That way, you won't get the 'firefox' updates unless you approve them. HOWEVER, keep in mind that FIrefox updates include security patches done by the SEcurity Team, so you have to be mindful that if you refuse to update them (apt or snap version), you will be missing a lot of updates and patches and security fixes. – Thomas Ward Jan 14 '22 at 15:49
  • 4
    ALSO, for 22.04 cycle, Firefox is solely snapped, and you will not be able to opt out of these updates in the next release of Ubuntu - this was a decision by Firefox upstream to start snapping it and outside our total control (the apt version will, like the Chromium browser package, simply be a metapackage that installs the snap) – Thomas Ward Jan 14 '22 at 15:50
  • 4
    @ThomasWard We will still have Debian/Linux Mint repositories for non-snapped firefox :) – Archisman Panigrahi Jan 14 '22 at 16:36
  • 1
    Thanks for the comments.

    I explicitly do not want to disable automatic updates, but I would like firefox to give me a popup so I can deny/delay it when I'm working at something where an immediate restart is undesireable (video call session / booking a ticket / ...). But it seems such an option does not exist.

    – IIVQ Jan 14 '22 at 17:09
  • Just to be clear: I apparently have automatic updates in Firefox (on my apt-installation, on kubuntu 21.10).

    I have manual updates of system packages (snap or apt) in Kubuntu.

    – IIVQ Jan 14 '22 at 17:16
  • 1
    @IIVQ you must have installed FF outside the apt package system then. Updating through FF is disabled for versions installed through apt. If you download FF directly from Mozilla, you can get into the situation you describe. https://www.mozilla.org/en-US/firefox/linux/ Note that website states "Firefox automatically updates itself by default but you can always do a manual update. " – Organic Marble Jan 14 '22 at 21:08
  • @ArchismanPanigrahi the use of which is NOT recommended for Ubuntu systems and not supported when using Ubuntu. So let's avoid doing nonsupported recommendations, hmm? Especially because mixing non-Ubuntu repos with ubuntu will break things. – Thomas Ward Jan 14 '22 at 21:47
  • @IIVQ If you have apt version of Firefox - as you indicated - you will have this popup (but from system updater and not from Firefox; Firefox is updated like all other packages) if you change the setting indicated on the picture above from "Download and install automatically" to "Display only". – raj Jan 14 '22 at 22:21
  • This answer seems like throwing the baby out with the bath water. In order to resolve a problem with just one package, you're making a change that affects the entire system. If you want to follow this approach I would suggest limiting it to just the Firefox package e.g. see here. At least then you are free to choose automatic updates for the rest of the system, while having manual control over when to update Firefox. – Jon Bentley Jan 15 '22 at 00:10
  • 3
    @JonBentley Holding the firefox package will completely prevent it from updating. That's why, I suggested OP to manually update the computer. Automatic updates in the background can often lead to issues, for example, a faulty update of the graphics driver before a presentation can ruin it. In my opinion, it is a good idea to know what is being updated. This is not Windows. Users should control when they want to update. – Archisman Panigrahi Jan 15 '22 at 04:30
  • @ArchismanPanigrahi Whether or not automatic updates are a good or a bad thing is a different topic. My point is that a good answer shouldn't have side effects on the rest of the system; the choice of whether to have system-wide automatic updates should be a choice that can be made separately of of the choice to automatically update Firefox. Holding a package isn't an irreversible action which prevents you from manually updating. – Jon Bentley Jan 16 '22 at 00:37
11

Firefox upgdates come from the Ubuntu security repository and so are handled by unattended-upgrades. You really shouldn't delay these updates because they typically address critical security issues (see https://ubuntu.com/security/notices?order=newest&release=focal&details=firefox).

As to why Firefox exhibits this behavior, see https://bugzilla.mozilla.org/show_bug.cgi?id=1492023.

That said, you could change this behavior by doing one of the following:

Option 1: Install unattended upgrades only at shutdown:

In the file /etc/apt/apt.conf.d/50unattended-upgrades, uncomment and change this line:

//Unattended-Upgrade::InstallOnShutdown "false";

To this:

Unattended-Upgrade::InstallOnShutdown "true";

Then use the command line to add a configuration snippet for logind to allow longer delays during shutdown so packages have time to install:

sudo mkdir /etc/systemd/logind.conf.d
echo "InhibitDelayMaxSec=3600" | sudo tee /etc/systemd/logind.conf.d/00-InhibitDelayMaxSec

Option 2: Block unattended upgrades of Firefox:

This will block unattended upgrades of Firefox packages, so you will have to remember to manually run sudo apt upgrade firefox somewhat frequently.

In the file /etc/apt/apt.conf.d/50unattended-upgrades, add "firefox"; to the Unattended-Upgrade::Package-Blacklist section by changing this:

// Python regular expressions, matching packages to exclude from upgrading
Unattended-Upgrade::Package-Blacklist {
    // The following matches all packages starting with linux-
//  "linux-";

To this:

// Python regular expressions, matching packages to exclude from upgrading
Unattended-Upgrade::Package-Blacklist {
    "firefox";
    // The following matches all packages starting with linux-
//  "linux-";
  • 1
    This is the most informative reply I have seen so far, thanks! I agree with that you shouldn't delay security updates too long, but say half an hour (to finish booking a train ticket) should not matter too much IMHO. I am first trying Terrence's solution, if that is unsatisfactory, I'm going to do yours. – IIVQ Jan 17 '22 at 08:16
  • 2
    Setting security update settings to "notify only" instead of "automatically download & install" (which is the default) - like in Archisman Panigrahi's answer - should also work. At least it works for me. I get a popup every time there are any updates to be installed and I have to manually accept the installation. This is the best option IMHO, and not only related to Firefox updates, but to any updates in general. – raj Jan 17 '22 at 10:54
5

NOTE: This answer is for when you install Firefox directly from Mozilla and not from the repos (snap/apt-get).


If you go to about:config in the address bar and then state that you will be careful, you can set some update settings that should help you.

In the search box after going to about:config type in app.update and set the one for app.update.auto to false, then lower set the app.update.notifyduringdownload to true so that you know when it is going to update.

enter image description here

enter image description here

Hope this helps!

Terrance
  • 41,612
  • 7
  • 124
  • 183
  • I made this setting, now to wait for another update. Will keep you posted! – IIVQ Jan 17 '22 at 08:12
  • 4
    This will not work in Ubuntu when Firefox is installed through snap/apt. The package manager is managing the updates, not Firefox itself. – Dan Jan 17 '22 at 09:27
  • 1
    @IIVQ Dan above does have a good point. I am sorry, but this is for when you have Firefox not being controlled by Canonical through the snap/apt package manager. Mine is actually installed from Mozilla themselves. – Terrance Jan 17 '22 at 14:33
3

There is a check box in Settings - General Tab to tell Firefox to stop auto update See this:

Image of Firefox settings user interface

Update:

The answer by @Terrance defines another way of disabling update by modifying config variables. There is still another way of defining config variable to enable/stop app update or other things: by defining enterprise policies. The steps are outlined below.

  1. Open Firefox and type about:policies in the address bar. Press the enter key.
  2. A window will open which will list policies already defined.
  3. Click the "Documentation" Tab on the left and you will see a long list of config variable you can define as policy in Firefox.
  4. Close Firefox and create a folder distribution under Firefox directory.
  5. Create a file policies.json inside the 'distribution' folder just created. Refer Documentation tab for name of variables as in step 3.
  6. Edit the file policies.json and specify config variables like this.
{
 "policies": {
   "DisableAppUpdate": true,
   "DisableFirefoxAccounts": false,
   "DisableFirefoxStudies": true,
   "DisablePocket": true,
   "DisableTelemetry": true,
   "DontCheckDefaultBrowser": true,
   "SearchBar": "separate"
   }
}
  1. Save the file and restart firefox.
  2. Check the active policies by following step 1.

You should see something like this.

image of Firefox policies user interface

AjayC
  • 398
  • 4
    This check box is not in my version (96) of firefox. – IIVQ Jan 14 '22 at 13:12
  • 2
    @IIVQ If you don't have this checkbox then you probably have apt version of Firefox, which is updated by system updater. In that case my answer from SuperUser should work (linked in the comment below your question) - at least it works for me and gives me prompt to install updates. If you have a non-apt version of Firefox, downloaded directly from Mozilla and installed manually, then this checkbox should be present. Either one or the other. – raj Jan 14 '22 at 22:17
  • @raj Indeed I do not have this button, but Firefox still auto-updates mid-session. – IIVQ Jan 17 '22 at 08:13
  • @IIVQ Did you change the system update settings to "notify only" for security updates? – raj Jan 17 '22 at 10:47
1

It turns out that the snap version of Firefox that is supplied with versions of Ubuntu from 22.04 will update automatically..

.. the snapd daemon checks for updates four times a day by default..

.. but, unlike the .deb version of Firefox, the sandboxing of snap programs means that you can continue using the current one for as long as you like afterwards.

For this reason alone, I am prepared to tolerate Firefox being a snap.

(My problem is that there's no notification that a snap update has happened! As the new version will only be used once you close the (still working) previous one, if you keep the PC on and don't close Firefox, you'll never know there's a new version ready to use when you restart.)

Ian
  • 11
  • 2
0

I blocked unattended firefox upgrades as suggested by @fuzzydrawrings, then added an update notification using cron. First run crontab -e to edit your crontab file, then add this line:

0 11 * * * apt list --upgradeable | grep firefox && XDG_RUNTIME_DIR=/run/user/$(id -u) notify-send --expire-time=0 "an update is available for firefox"

(note the line above is too long to be shown here, but you can copy the whole thing)

This line says:

  • 0 11 * * * every day at 11:00
  • apt list --upgradeable | grep firefox check whether there is a firefox update available
  • && XDG_RUNTIME_DIR=/run/user/$(id -u) notify-send ... and if so, pop up a persistent notification
Luke
  • 871
0

Running Firefox 64bit ver.108, and for quite awhile the setings for auto update has been 'missing'. If you want to still get updates, just not automatically (asks you instead of just interrupting and forcing update at inopportune times...), then try this:

The way I was able to 'disable' the auto firefox update (still downloads, just doesn't interrupt you and install while you sit there helpless) was: open settings - type 'about:config' then type 'app.update.auto' and change the setting to 'false' (see below from documentation)

AppAutoUpdate

Enable or disable automatic application update.

If set to true, application updates are installed without user approval within Firefox. The operating system might still require approval.

If set to false, application updates are downloaded but the user can choose when to install the update.

If you have disabled updates via DisableAppUpdate, this policy has no effect. Compatibility: Firefox 75, Firefox ESR 68.7 CCK2 Equivalent: N/A Preferences Affected: app.update.auto

So, also don't forget to type 'DisableAppUpdate' and change it to 'false' also!

MEANWHILE - be careful when using this 'about:config' as it can really mess things up if you are not VERY, VERY careful!!!

...for good measure, edit the /etc/firefox/policies/policies.json (and in any edit the /etc/firefox/distribution/policies.json) and delete the stuff there and instead add:

{
  "policies": {
    "AppAutoUpdate": false, 
    "DisableAppUpdate": false
  }
}
The MAJOR
  • 99
  • 2
  • 16