Posted on 01-14-2022 07:59 AM
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.
01-14-2022 08:13 AM - edited 01-14-2022 08:14 AM
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.
Posted on 01-14-2022 08:27 AM
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.
Posted on 01-15-2022 06:34 PM
Did you try:
#! /bin/sh
echo 'user_pref("network.http.http3.enabled", false);' >> `ls ~/Library/Application\ Support/Firefox/Profiles/*.default-release/prefs.js`