3

Lately when I download a file in Firefox I get this nag dialog:

enter image description here

I tried following the instructions at this link: https://support.mozilla.org/en-US/questions/1260307, but the nag dialog persists.

I believe part of the reason I am getting this notification is that I am saving the files to an NTFS file system on a GNU/Linux system, where all files have the executable bit set on mount.

How can I disable this nag dialog in Firefox?

As requested below, here is a screenshot of the about:config variable set:

enter image description here

1 Answer 1

1

So far as I can tell, the code to respect the preference is there:

https://hg.mozilla.org/mozilla-central/file/tip/toolkit/components/downloads/DownloadUIHelper.jsm#l184

  /**
   * Displays a warning message box that informs that the specified file is
   * executable, and asks whether the user wants to launch it.
   *
   * @param path
   *        String containing the full path to the file to be opened.
   *
   * @resolves Boolean indicating whether the launch operation can continue.
   */
  async confirmLaunchExecutable(path) {
    const kPrefSkipConfirm = "browser.download.skipConfirmLaunchExecutable";

    // Always launch in case we have no prompter implementation.
    if (!this._prompter) {
      return true;
    }

    try {
      if (Services.prefs.getBoolPref(kPrefSkipConfirm)) {
        return true;
      }
    } catch (ex) {
      // If the preference does not exist, continue with the prompt.
    }

    let leafName = OS.Path.basename(path);

    let s = DownloadUIHelper.strings;
    return this._prompter.confirm(
      s.fileExecutableSecurityWarningTitle,
      s.fileExecutableSecurityWarning(leafName, leafName)
    );
  },

There don't see to be any recent revisions to the file either:

https://hg.mozilla.org/mozilla-central/log/tip/toolkit/components/downloads/DownloadUIHelper.jsm

Are you sure that the preference is properly set in about:config? Could you show us a screenshot of it?


Update

Thanks for the screenshot. It looks like the name of the variable is incorrect. The name is currently browser.download.skipConfirmLaunchExecutable = true instead of browser.download.skipConfirmLaunchExecutable. If you click the trashcan icon on the right, you should be able to remove that entry and then re-create it to look like this:

enter image description here

(when you re-create the new preference, just use browser.download.skipConfirmLaunchExecutable, ensure the "boolean" radio entry is checked, and click the plus icon. That should create the preference as a boolean, with default value true)

Let me know if that works.

3
  • I added a screenshot to the original post. I also closed and re-opened firefox and then also rebooted the machine. When I click this link (or any other) I get the same issue after saving the file and opening it through firefox: w3schools.com/howto/…
    – JoshuaD
    Apr 12, 2022 at 7:18
  • @JoshuaD thanks! I've updated my answer. It looks like you've got the variable name a bit off. Apr 12, 2022 at 13:17
  • 1
    Oh man I feel stupid. Thanks buddy.
    – JoshuaD
    Apr 13, 2022 at 2:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .