MozillaZine

Lock or Restore Firefox Settings

User Help for Mozilla Firefox
BorgInvasionReturns
 
Posts: 48
Joined: April 20th, 2015, 6:27 pm

Post Posted September 28th, 2020, 11:28 am

At my job place I ended up getting a replacement laptop for my dying one. Since then, I can not keep certain settings to stick. It has to be something with new company policies on the laptop or their anti virus program, none to which I have control over, but I was using Firefox and my addons happily on my other laptop for years. At this point every time I reset Firefox, I lose certain settings. My IT people do not understand why, nor they bother with FF anyway. There could be a chance maybe it is a bug or something? I do not know.

Refreshing Firefox does not help. The only thing I found to make them stick temporarily, when closing FF and opening it again, was uninstalling it, removing all traces of Mozilla from the laptop, and reinstalling it. My settings will then stay for a few hours then at some point, they start resetting again.

The settings that keep changing are:
My save location keeps going back to the default "ask," from my preferred location.
"Ask to save logins" gets unchecked, disabling all the other options, instead of them all staying clicked.
Firefox goes to "custom history" instead of staying on "remember history."

What I can tell from the prefs.js is that it keeps settings after closing FF but then reopening FF is when they get changed.

Is there someway to force FF to keep the settings I give it?

morat
 
Posts: 4019
Joined: February 3rd, 2009, 6:29 pm

Post Posted September 28th, 2020, 4:46 pm

Have you tried starting Firefox in Mozilla Safe Mode?

Safe mode
http://kb.mozillazine.org/Safe_mode

...

You can use the lockPref function to lock a preference.

Deploying Firefox in an enterprise environment
http://developer.mozilla.org/Firefox/Enterprise_deployment_before_60

How to find an options preference.

* copy prefs.js to prefs.backup in profile folder
* change a setting in options
* exit app
* file compare prefs.js and prefs.backup

File compare
http://www.howtogeek.com/206123/
http://ss64.com/nt/fc.html

...

Try searching for the preferences in the following files.

* <install directory>\defaults\pref\*.js
* <profile directory>\user.js

Maybe your organization is setting those preferences.

"Ask to save logins and passwords for websites" -> signon.rememberSignons

"Remember history" or "Use custom settings for history" -> privacy.history.custom

...

Are you using the policies.json file or policy templates?

about:policies

Policy Templates for Firefox
http://github.com/mozilla/policy-templates
http://github.com/mozilla/policy-templates/releases (for customizing with Group Policy)
http://github.com/mozilla/policy-templates/issues

Does Avast disable my ability to change some options in Firefox?
http://forum.avast.com/index.php?topic=227521.0

Maybe your Antivirus is causing the problem.

jscher2000

User avatar
 
Posts: 11069
Joined: December 19th, 2004, 12:26 am
Location: Silicon Valley, CA USA

Post Posted September 28th, 2020, 6:59 pm

BorgInvasionReturns wrote:Firefox goes to "custom history" instead of staying on "remember history."

If you look at what is checked and unchecked under History when "Use custom settings" is selected, what is different from the default?

Default:

[_] Always use private browsing mode
[X] Remember browsing and download history
[X] Remember search and form history
[_] Clear history when Firefox closes

BorgInvasionReturns
 
Posts: 48
Joined: April 20th, 2015, 6:27 pm

Post Posted September 28th, 2020, 7:53 pm

Morat,

I will try that lockPref method tomorrow and will keep you posted. That is worth a shot.

As for your other comments, Safe Mode loses the settings too.

The preference files you mentioned:
* <install directory>\defaults\pref\*.js
Only two files: channel-prefs.js and local-settings.js
* <profile directory>\user.js
User.js does not exists at all on the computer. I checked my home PC for comparison and it is not there either.

There is also no policies.json file on the computer.

I personally think it has something to do with some policies on this laptop my old one did not have, but IT has no idea. They rather everyone use Edge and Chrome. So, I am trying to find a workaround.

jscher2000, using your table, on each FF restarts the History comes out like this:
[_] Always use private browsing mode
[X] Remember browsing and download history
[_] Remember search and form history
[_] Clear history when Firefox closes

morat
 
Posts: 4019
Joined: February 3rd, 2009, 6:29 pm

Post Posted September 28th, 2020, 9:07 pm

The user.js file doesn't exist by default so it's not a problem if it doesn't exist.

The local-settings.js file doesn't exist by default. Did you create the file? What are the contents of the file? Is the general.config.filename pref in the file?

The issue shouldn't be caused by an extension.

More info
http://wiki.mozilla.org/WebExtensions/F ... erences.3F

therube

User avatar
 
Posts: 20559
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Post Posted September 29th, 2020, 1:14 pm

(

Heh. I thought you were going to point to some file comparison program I hadn't run across.
Anyhow, might check out WinMerge or ExamDiff (among others) or file manager with built-in compare, Altap Salamander 4.0 - Freeware.
)
Fire 750, bring back 250.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript

BorgInvasionReturns
 
Posts: 48
Joined: April 20th, 2015, 6:27 pm

Post Posted September 29th, 2020, 6:34 pm

Well, morat, you got me following some trails to find what is causing this, even though my IT says it has nothing to do with it.

I looked at C:\Program Files\Mozilla Firefox\defaults\pref\local-settings.js and it had two entries.

pref("general.config.obscure_value", 0);
pref("general.config.filename", "mozilla.cfg");

So, I went looking for that file and found C:\Program Files\Mozilla Firefox\mozilla.cfg. Dated July 10, 2020. So, it has to have been pushed from Security somehow on this new laptop (which I just got two weeks ago), but seems to only happen a few hours after each time I uninstall and reinstall Firefox.

None of these files are even on my home units, and I personally do not use c:\program files\ when I install things.

Anyway, I opened it and found a bunch of fun (being sarcastic) stuff. Much related to my company's network proxy access. I did find these entries to match the issues with settings I am having. I removed some entries from these groups that did not matter to me right now.

// set Firefox Default homepage
pref("browser.startup.homepage","https://……..");

// download settings
pref("browser.download.useDownloadDir", false);

// browser settings
pref("browser.formfill.enable", false);
pref("browser.search.update", false);
pref("extensions.update.enabled", false);

//lockPref("config.lockdown.disable_extensions", true);
lockPref("config.lockdown.disable_themes", true);
lockPref("xpinstall.enabled", false);

// signon disabled
pref("signon.rememberSignons", false);

Of all the options in the file, these were the ones that caught my attention. So, one by one I commented them all out each time I reset Firefox.

Example
// pref("browser.search.update", false);

One by one each of my settings stayed the way I wanted them to. I have rebooted and they stayed. I powered off, they stayed. And all this on the company network in the building.

At home, not on the VPN, they still stay.
Then I went on the company VPN at home, still my settings stay.

So, maybe I found the cause of my settings always changing. Just a matter on if and when another copy of that file gets pushed to overwrite my changes. So, will give this time and see what happens.

dickvl

User avatar
 
Posts: 53204
Joined: July 18th, 2005, 3:25 am

Post Posted September 30th, 2020, 9:58 am

Note that pref() calls mean that each time you start Firefox you get this setting, so pref("signon.rememberSignons", false); will disable the Password Manager each time you start Firefox and you can't permanently enable this feature.
This goes for all settings with a pref() call line.
If a pref is locked via lockPref() then you won't be able to modify this setting.

https://support.mozilla.org/en-US/kb/cu ... autoconfig
https://github.com/mozilla/policy-templ ... /README.md

BorgInvasionReturns
 
Posts: 48
Joined: April 20th, 2015, 6:27 pm

Post Posted September 30th, 2020, 10:35 am

Yup. And since commenting them out, rather than me just changing from true to false or reverse so faster for me to watch for changes, is so far working still.

therube

User avatar
 
Posts: 20559
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Post Posted September 30th, 2020, 10:36 am

Also note that any mozilla.cfg files (& related - though not everything mentioned above is related) is all non-standard, is not part of a "regular" user install. So the fact that mozilla.cfg exits at all, means that someone (your employer in this case) specifically put those files (policies) into place (effect).

You needn't use those setting at all, necessarily.

Oh, actually you do. It's their machine. Unless they're OK with you disabling their Policies.


So if you block/stop them, those "Policies", from having any effect, & if you then still have the same issue, then you can rule out those Policy settings as the cause.


Refreshing Firefox does not help.

Refreshing affects a Profile - but not the program itself (or in this case Policies implemented by your company).


The only thing I found to make them stick temporarily, when closing FF and opening it again, was uninstalling it, removing all traces of Mozilla from the laptop, and reinstalling it. My settings will then stay for a few hours then at some point, they start resetting again.

If you do that, & open FF, once, for good measure, make your setting changes, then close FF, does prefs.js some hours later magically alter itself?

If you do that, make your settings changes, leave FF open, but otherwise don't interact with it for a few hours, when you again look, has pref.js altered itself?

Your comparison of the before/after prefs.js, it's always the same Prefs that have changed (excluding ancillary ones that would normally change on their own, like update time check or similar)?

---

Are you using "sync" (whatever it is that FF has)?
Fire 750, bring back 250.
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript

BorgInvasionReturns
 
Posts: 48
Joined: April 20th, 2015, 6:27 pm

Post Posted October 8th, 2020, 12:40 pm

Sorry. I never got an email there were new posts.

So far, the changes I implemented are still working.

Return to Firefox Support


Who is online

Users browsing this forum: Google [Bot], Google Adsense [Bot] and 9 guests