Skip to main content
Question

How do we change a setting in Firefox prefs.js?


howie_isaacks
Forum|alt.badge.img+23

This morning I read about a problem with Firefox not loading webpages. 

https://www.windowscentral.com/how-fix-mozilla-firefox-infinite-loop-problem-stops-website-loading

The fix is simple, but I was hoping to be able to script the settings change. The problem I run into is that the path to the file is something like: /Users/username/Library/Application Support/Firefox/Profiles/8r5zj5rx.default-release/prefs.js

I don't know what characters will be before ".default-release", so that makes scripting this harder. I'm exploring some ideas like having the script first run the "ls -l" command to list the contents of the Profiles folder, but I'm getting stuck on how to get around the random characters and get into the folder. Is there a way to do this using a wildcard of some kind? Once I'm past this folder, it should be simple to write a "false" value for the setting that needs to be changed if a user is having a problem.

3 replies

Tangentism
Forum|alt.badge.img+10
  • Honored Contributor
  • 146 replies
  • January 14, 2022

You can do a cat of the profiles.ini file in that same folder path to get the name of the default profile. That will ensure that you capture the profile that is loading and not just a list of all the profiles that have been created then trying to guess.

 

 

 


howie_isaacks
Forum|alt.badge.img+23
  • Author
  • Esteemed Contributor
  • 773 replies
  • January 14, 2022
Tangentism wrote:

You can do a cat of the profiles.ini file in that same folder path to get the name of the default profile. That will ensure that you capture the profile that is loading and not just a list of all the profiles that have been created then trying to guess.

 

 

 


Thanks! Now I work on this and try to figure out how to take the results from cat and extract only what I need to proceed. I did something like this before so I'm looking at one of my past scripts to figure out how to modify the commands to use in this case.


Forum|alt.badge.img+1
  • New Contributor
  • 6 replies
  • January 16, 2022

Did you try:

#! /bin/sh

echo 'user_pref("network.http.http3.enabled", false);' >> `ls ~/Library/Application\\ Support/Firefox/Profiles/*.default-release/prefs.js`


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings