Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

Learn More

User changes to default homepage are overwritten

more options

I am running FF 5.0.1 in Windows 7 32-bit. I want to give all my users two default tabs as homepages when firefox launches, but I want my users to be able to change their homepages under their individual profiles if they desire. I created a .cfg file in C:\Program Files\Mozilla Firefox which includes the following two preferences: pref("browser.startup.page", 1); pref("browser.startup.homepage", "http://example.com/|http://example2.com"); I created a C:\Program Files\Mozilla Firefox\defaults\pref\local-settings.js file in which I called my above-referenced cfg file. When my users log on their homepages do default to example.com and example2.com. But if my user changes their home pages and closes their browser then the next time they launch their browser their home pages are reset back to example.com and example2.com. How can I set this so that example.com and example2.com will be the default home pages for every user but that once a user changes the home page under their own profile their changes will "stick?" Thanks.

I am running FF 5.0.1 in Windows 7 32-bit. I want to give all my users two default tabs as homepages when firefox launches, but I want my users to be able to change their homepages under their individual profiles if they desire. I created a .cfg file in C:\Program Files\Mozilla Firefox which includes the following two preferences: pref("browser.startup.page", 1); pref("browser.startup.homepage", "http://example.com/|http://example2.com"); I created a C:\Program Files\Mozilla Firefox\defaults\pref\local-settings.js file in which I called my above-referenced cfg file. When my users log on their homepages do default to example.com and example2.com. But if my user changes their home pages and closes their browser then the next time they launch their browser their home pages are reset back to example.com and example2.com. How can I set this so that example.com and example2.com will be the default home pages for every user but that once a user changes the home page under their own profile their changes will "stick?" Thanks.

所有回复 (2)

more options

Use defaultPref() to set the default value.

You can use these functions in mozilla.cfg:

defaultPref();  // set new default value
pref(); // set pref, but allow changes
lockPref();  // lock pref, disallow changes
more options

I have this same problem, except we are using 4.0.1:

If i use defaultPref instead of pref the home page is just a blank white page (about:blank)

Here is my Mozilla.cfg:

---BEGIN---

//
lockPref("browser.safebrowsing.enabled", false);
lockPref("browser.safebrowsing.malware.enabled", false);
lockPref("network.proxy.type", 0);
lockPref("app.update.enabled", false);
lockPref("browser.cache.disk.capacity", 1048576);
lockPref("browser.cache.disk.smart_size.enabled", false);
lockPref("network.automatic-ntlm-auth.trusted-uris", "example.com");
lockPref("services.sync.clusterURL", "disabled");
lockPref("services.sync.jpake.serverURL", "disabled");
lockPref("services.sync.privacyURL", "disabled");
lockPref("services.sync.serverURL", "disabled");
lockPref("services.sync.statusURL", "disabled");
lockPref("services.sync.syncKeyHelpURL", "disabled");
lockPref("services.sync.termsURL", "disabled");
lockPref("services.sync.userURL", "disabled");
pref("browser.startup.homepage", "http://www.example.com/");
//defaultPref("browser.startup.homepage", "http://www.example.com/");
pref("browser.download.useDownloadDir", false);
pref("browser.urlbar.default.behavior", 1);
pref("browser.cache.disk.smart_size.enabled", false);
pref("signon.rememberSignons", false);
pref("browser.rights.3.shown", true);
pref("browser.startup.homepage_override.mstone", "ignore");

---END---

由cor-el于修改