X
點擊此處開啟此網站的行動版。

技術支援討論區

Enterprise Environment. Need to set a default start page in Firefox43 for any current and ALL future users.

已張貼

I use Firefox in an enterprise environment that has no internet access and want to be able to set the default startup page for all users accessing the PC to our training center's webpage. If I change it in the about:config, it is only a "user setting" based on profile. I need to make it default so that any user logging onto the machine gets the desired page. I've tried several of the creating the js preference files and config files mentioned in some of the support blogs, but they do not work in Firefox 43. I'm responsible for about 1200 physical machines, and about 800 (and rising) VMs.

The training instructors don't want to have the students open the shortcut on the desktop and set it as their homepage each time they move to a different PC or classroom as during a 16 week course, the students are apt to forget.
I use Firefox in an enterprise environment that has no internet access and want to be able to set the default startup page for all users accessing the PC to our training center's webpage. If I change it in the about:config, it is only a "user setting" based on profile. I need to make it default so that any user logging onto the machine gets the desired page. I've tried several of the creating the js preference files and config files mentioned in some of the support blogs, but they do not work in Firefox 43. I'm responsible for about 1200 physical machines, and about 800 (and rising) VMs. The training instructors don't want to have the students open the shortcut on the desktop and set it as their homepage each time they move to a different PC or classroom as during a 16 week course, the students are apt to forget.

被選擇的解決方法

You get "Failed to read the configuration file" when there is a problem with the mozilla.cfg file. Check via the properties that the file doesn't have a hidden .txt Firefox (i.e. is a CFG file) since the screenshot show that mozilla.cfg is a Text file.

從原來的回覆中察看解決方案 1

額外的系統細節

已安裝的外掛程式

  • ActiveTouch General Plugin Container Version 105
  • Adobe PDF Plug-In For Firefox and Netscape 10.1.7
  • Citrix Online App Detector Plugin
  • IE Tab 2 Plug-in for Mozilla/Firefox
  • Intel web components for Intel® Identity Protection Technology
  • Intel web components updater - Installs and updates the Intel web components
  • NPRuntime Script Plug-in Library for Java(TM) Deploy
  • Office Authorization plug-in for NPAPI browsers
  • The plug-in allows you to open and edit files using Microsoft Office applications
  • NVIDIA 3D Vision Streaming plugin for Mozilla browsers
  • NVIDIA 3D Vision plugin for Mozilla browsers
  • Shockwave Flash 21.0 r0
  • 5.1.40728.0
  • VMware Remote Console Plug-in

應用程式

  • User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0

更多資訊

cor-el
  • Top 10 Contributor
  • Moderator
17681 個解決方法 159964 個答案

You can use the mozilla.cfg file in the Firefox program folder to set the default for preferences.

A local-settings.js file needs to be placed in the "defaults/pref" folder where also the channel-prefs.js file is located to specify using mozilla.cfg.

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

These functions can be used in the mozilla.cfg file:

defaultPref();	// set new default value
pref();		// set pref, allow changes in current session
lockPref();	// lock pref, disallow changes

The mozilla.cfg file needs to start with a comment line (//)

Note that setting the default for a complex (localized) pref needs special handling.

defaultPref("browser.startup.homepage","data:text/plain,browser.startup.homepage=http://home.example.com");

See Configuration:

You can use the <u>mozilla.cfg</u> file in the Firefox program folder to set the default for preferences. A <u>local-settings.js</u> file needs to be placed in the "defaults/pref" folder where also the channel-prefs.js file is located to specify using mozilla.cfg. pref("general.config.filename", "mozilla.cfg"); pref("general.config.obscure_value", 0); These functions can be used in the mozilla.cfg file: defaultPref(); // set new default value pref(); // set pref, allow changes in current session lockPref(); // lock pref, disallow changes The mozilla.cfg file needs to start with a comment line (//) Note that setting the default for a complex (localized) pref needs special handling. defaultPref("browser.startup.homepage","data:text/plain,browser.startup.homepage=http://home.example.com"); See Configuration: *https://developer.mozilla.org/en-US/Firefox/Enterprise_deployment

提出問題者

Thank you, but this does not seem to be working.

I created the local-settings.js file and placed it in the "defaults/prefs" folder. I created a mozilla.cfg file and placed it in the Mozilla Firefox folder in the Program Files folder.

The first time, I did get an error reading the "mozilla.cfg" file, which I corrected.  But it will still not display the desired page.  I tried about 4 different ways.

Attached is are 2 screenshots listing the 4 attempts ( all listed in one pic) I made for the mozilla.cfg file and the local-settings.js file

Thank you, but this does not seem to be working. I created the local-settings.js file and placed it in the "defaults/prefs" folder. I created a mozilla.cfg file and placed it in the Mozilla Firefox folder in the Program Files folder. The first time, I did get an error reading the "mozilla.cfg" file, which I corrected. But it will still not display the desired page. I tried about 4 different ways. Attached is are 2 screenshots listing the 4 attempts ( all listed in one pic) I made for the mozilla.cfg file and the local-settings.js file
cor-el
  • Top 10 Contributor
  • Moderator
17681 個解決方法 159964 個答案

The second screenshot shows that you have commented out the lines because they start with //. You would have to remove the leading // in the local-settings.js to make this file work.

The data variant in mozilla.cfg is only required if the set the default via defaultPref() and must not be used with pref() and lockPref() Also always place a comment line as the first line in mozilla.cfg because this line is always skipped.

// use one of these:
defaultPref("browser.startup.homepage","data:text/plain,browser.startup.homepage=http://home.example.com");
pref("browser.startup.homepage", "http://home.example.com");
lockPref("browser.startup.homepage", "http://home.example.com");
The second screenshot shows that you have commented out the lines because they start with //. You would have to remove the leading // in the local-settings.js to make this file work. The data variant in mozilla.cfg is only required if the set the default via defaultPref() and must not be used with pref() and lockPref() Also always place a comment line as the first line in mozilla.cfg because this line is always skipped. // use one of these: defaultPref("browser.startup.homepage","data:text/plain,browser.startup.homepage=http://home.example.com"); pref("browser.startup.homepage", "http://home.example.com"); lockPref("browser.startup.homepage", "http://home.example.com");

提出問題者

Alright, when I remove the // in the local-settings.js file, I get a "Configuration error" popup that says: Failed to read the configuration file. Please contact your system administrator.

 My local-settings.js file shows:

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

I'm assuming (and I dislike that word) this is supposed to direct where to find the named file "mozilla.cfg" which to my understanding, is placed in the Mozilla Firefox folder in Program Files. My mozilla.cfg doesn't seem to work no matter what I try.

// set new lock pref lockPref("browser.startup.homepage", "http://lwns-site.jnn.local"); or // Set new default Value defaultPref("browser.startup.homepage","data:text/plain,browser.startup.homepage=http://lwns-site.jnn.local"); Pardon my ignorance in programming, it's never been my area before​, but seems to be becoming a priority.

Alright, when I remove the // in the '''local-settings.js''' file, I get a "Configuration error" popup that says: Failed to read the configuration file. Please contact your system administrator. My local-settings.js file shows: '''''pref("general.config.filename", "mozilla.cfg"); pref("general.config.obscure_value", 0);''''' I'm assuming (and I dislike that word) this is supposed to direct where to find the named file "mozilla.cfg" which to my understanding, is placed in the Mozilla Firefox folder in Program Files. My mozilla.cfg doesn't seem to work no matter what I try. '''// set new lock pref lockPref("browser.startup.homepage", "http://lwns-site.jnn.local"); ''' or '''// Set new default Value defaultPref("browser.startup.homepage","data:text/plain,browser.startup.homepage=http://lwns-site.jnn.local"); ''' Pardon my ignorance in programming, it's never been my area before​, but seems to be becoming a priority.
cor-el
  • Top 10 Contributor
  • Moderator
17681 個解決方法 159964 個答案

選擇的解決方法

You get "Failed to read the configuration file" when there is a problem with the mozilla.cfg file. Check via the properties that the file doesn't have a hidden .txt Firefox (i.e. is a CFG file) since the screenshot show that mozilla.cfg is a Text file.

You get "Failed to read the configuration file" when there is a problem with the mozilla.cfg file. Check via the properties that the file doesn't have a hidden .txt Firefox (i.e. is a CFG file) since the screenshot show that mozilla.cfg is a Text file.