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

set default homepage from sysprefs.js

  • No replies
  • 2 have this problem
  • 7 views
more options

I'm working on a way to programatically set Firefox's default homepage to our company's website on Linux machines by deploying a line of code to /etc/firefox/sysprefs.js. So far I have tried these 4 options all added into sysprefs.js one at a time:

pref("browser.startup.homepage", "http://www.weebls-stuff.com/wab/"); lockPref("browser.startup.homepage", "http://www.weebls-stuff.com/wab/"); userPref("browser.startup.homepage", "http://www.weebls-stuff.com/wab/"); defaultPref("browser.startup.homepage", "http://www.weebls-stuff.com/wab/");

   * lockPref works but doesn't allow the user to change their homepage (not what we want)
   * pref doesn't have any effect on "browser.startup.homepage" in about:config and does NOT change the homepage setting
   * userPref works but changes the homepage back to our set preference every time Firefox is opened even if the user has manually changed their homepage (not what we want)
   * defaultPref doesn't have any effect on "browser.startup.homepage" in about:config and does NOT change the homepage setting

Can you suggest a way that I can make a specific website the default homepage but NOT lock that preference from being edited or overwrite the user's changes everytime the browser is restarted?

Thanks

I'm working on a way to programatically set Firefox's default homepage to our company's website on Linux machines by deploying a line of code to /etc/firefox/sysprefs.js. So far I have tried these 4 options all added into sysprefs.js one at a time: pref("browser.startup.homepage", "http://www.weebls-stuff.com/wab/"); lockPref("browser.startup.homepage", "http://www.weebls-stuff.com/wab/"); userPref("browser.startup.homepage", "http://www.weebls-stuff.com/wab/"); defaultPref("browser.startup.homepage", "http://www.weebls-stuff.com/wab/"); * lockPref works but doesn't allow the user to change their homepage (not what we want) * pref doesn't have any effect on "browser.startup.homepage" in about:config and does NOT change the homepage setting * userPref works but changes the homepage back to our set preference every time Firefox is opened even if the user has manually changed their homepage (not what we want) * defaultPref doesn't have any effect on "browser.startup.homepage" in about:config and does NOT change the homepage setting Can you suggest a way that I can make a specific website the default homepage but NOT lock that preference from being edited or overwrite the user's changes everytime the browser is restarted? Thanks