Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac install? #103

Closed
CouldBeThis opened this issue Nov 19, 2021 · 2 comments
Closed

Mac install? #103

CouldBeThis opened this issue Nov 19, 2021 · 2 comments

Comments

@CouldBeThis
Copy link

I am trying to work out Mac install. I believe I followed rest of instructions but not able to suss out what is required here. And Mac users or knowers can clarify?

In the readme:

→ For Linux and macOS paths, read this and this.

Second link to https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Enterprise_deployment_before_60#Configuration is now broken

Here is the most recent archive.org copy of that URL, from Feb 2021.

But perhaps it is no longer accurate? Title states it is regarding v <60.

Page is talking about a .cfg file which is not already in the repo. Am I supposed to create it? The instructions here as to what it is to contain are confusing to me.

Tried making sense of where to put the existing files.

For all the below, /Applications/Firefox.app/Contents/ is the root directory

1. Keep files in structure suggested by how they were packaged:

  • Resources/defaults/
    • config.js
    • pref/
      • config-prefs.js (pre existing)
      • channel-prefs.js

This led to starting as normal with nothing seeming to be different.

2. Put all files together

  • Resources/defaults/pref/
    • channel-prefs.js
    • config.js
    • config-prefs.js (pre existing)

Starting as normal with no changes but had error:

Configuration error.

Failed to read the configuration file. Please contact your system administrator.

3. mimic windows file locations

In #8 linked above, it states windows users put alongside the exe. In Mac, the full path to the actual executable is: MacOS/firefox

The other files in same directory are some other small applciation files like Crash Reporter and .dylib files.

  • MacOS
    • config.js
  • Resources/defaults/pref/
    • channel-prefs.js
    • config-prefs.js (pre existing)

Starting as normal with no changes but had same error:

Configuration error.

Failed to read the configuration file. Please contact your system administrator.

Didn't try: mimic linux

There is also a directory, /Applications/Firefox.app/Contents/Resources/browser but unlike what's reported in Linux, its only subdirectory is features containing a half dozen xpis from mozilla such as screenshots

At this point I feel like I would be throwing spaghetti at the wall to keep trying. 🍝 Hope I provided the correct information and not too much.

@xiaoxiaoflood
Copy link
Owner

xiaoxiaoflood commented Nov 19, 2021

Second link [...] is now broken

Thanks, I'll fix that.

Page is talking about a .cfg file which is not already in the repo.

.cfg file is the same as config.js in fx-folder.zip.
mozilla.cfg, config.js, autoconfig.js... there are many names for the same thing, because the file can have any name. The name should match the value of general.config.filename.

pref("general.config.filename", "config.js");

config-prefs.js (pre existing)

Sure? Here the pre existing file in defaults/pref is channel-prefs.js, not config-prefs.js. You shouldn't need to overwrite anything.


Not sure if this will work because I have no experience with macOS, but you can try:

  1. Open about-config and set devtools.chrome.enabled = true to enable input in Browser Console.
  2. Open Browser Console (Ctrl+Shift+J on Windows, or hamburger menu → More Tools → Browser Console or menubar → Tools → Browser Tools → Browser Console).
  3. Paste and press Enter:
    Services.dirsvc.get('PrfDef', Ci.nsIFile).path
    The output should be where you must paste config-prefs.js.
  4. For the folder where to paste config.js, you can try one of the following:
    Services.dirsvc.get('GreD', Ci.nsIFile).path
    Services.dirsvc.get('GreBinD', Ci.nsIFile).path
    Services.dirsvc.get('CurWorkD', Ci.nsIFile).path
    For me, all of these return the folder where my config.js is placed, next to firefox.exe.

@xiaoxiaoflood
Copy link
Owner

xiaoxiaoflood commented Nov 25, 2021

Mac path for fx-folder.zip files:

Firefox.app\Contents\Resources

So

  • Firefox.app\Contents\Resources\config.js
  • Firefox.app\Contents\Resources\defaults\pref\config-prefs.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants