Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Prefs.js file is generated in random userprofile path, need to overwrite it dynamically

  • 11 replies
  • 1 has this problem
  • 13 views
  • Last reply by jon.dickens

more options

Need way to overwrite prefs.js with corporate standard for kiosk like environment. Either need way to have firefox install in standard path within each user profile or have firefox insert file from source. Advice ? thanks.

Need way to overwrite prefs.js with corporate standard for kiosk like environment. Either need way to have firefox install in standard path within each user profile or have firefox insert file from source. Advice ? thanks.

All Replies (11)

more options

Modified by cor-el

more options

We have configured the autoconfig and userchrome files and need to add a static print shortcut to the browser bar. Is this possible with json? historically the prefs.js file was used for this.

thanks,

    Jon
more options

Is that about a toolbar button or about a bookmark or something else ?

In an autoconfig.cfg file you can possibly include JavaScript code to parse and edit browser.uiCustomization.state if that is the pref you are interested in. You need to disable the sandbox via autoconfig.js to be able to run privileged JavaScript code if you do not use ESR versions.

The autoconfig.js file that specifies to use autoconfig.cfg is placed into the "defaults\pref" directory where the channel-prefs.js file is located.

//
pref("general.config.filename", "autoconfig.cfg");
pref("general.config.obscure_value", 0);
pref("general.config.sandbox_enabled", false); // required if you need to disable the sandbox and run JavaScript code
more options

We need to add the print icon to the locked down bar besides the url area.

more options

is there a way to set a profiles.ini in the application directory\system to standardize the profile directory? i could then use group policy to overwrite the prefs.js.

more options

You can modify the name of the directory in profiles.ini to be a consistent name and then move your files into that directory.

You can also use

-p "profile path"

https://wiki.mozilla.org/Firefox/CommandLineOptions#-profile_.22profile_path.22

to have Firefox put the profile in a specific place.

more options

Thanks, i used a scheduled task to overwrite at boot. Resolved... should really be able to code this in the ADMX.

more options

Can you be more specific about your specific ask so I can open a bug?

Do you want profiles to not have random names?

Or do you want to be able to put the Mozilla directory in an arbitrary location?

more options

Hi

  It would be nice from an enterprise support perspective if the profile directory always had the same path for every install.  Placing a profile.ini in the profile path seems a bit redundant, as if you can do that, you can overwrite the prefs.js.  Another nice option would be to place prefs.js in the installdir/defaults/profile directory for it be be auto-populated into the profile upon generation like the stylesheets.
   Mike, thank you for your efforts, most appreciated.

Regards,

      Jon
more options

Been sitting on this forever, but for some reason didn't reply.

The reason profiles are the way they are is so malware can't easily find your profile.

If you want to put a profile at a specific path, you can do that with some Firefox command line parameters:

https://wiki.mozilla.org/Firefox/CommandLineOptions

Particularly

https://wiki.mozilla.org/Firefox/CommandLineOptions#-profile_.22profile_path.22

more options

Thanks Mike. Appreciate the response.