X
Tap here to go to the mobile version of the site.

Support Forum

defaultpref

Posted

hello, i contact you because i have a probleme with the defaultpref in a .cfg config file.

This parameter is for Browser.Startup.homepage. This one is right applicate on the browser because when i look in the about:config this parameter is in "by default" statu with de right URL i setted , but when i start the brower , this URL is not loaded on de default page.

if i change the paremeter from "defaultPref" to "pref" or " lockPref" in the .cfg this work, but the end user doesn't may change the value and we need to let the choise at the end users to change if they want.

Can you help me to solve this issue.

king regards.

Mr SUEUR.

hello, i contact you because i have a probleme with the defaultpref in a .cfg config file. This parameter is for Browser.Startup.homepage. This one is right applicate on the browser because when i look in the about:config this parameter is in "by default" statu with de right URL i setted , but when i start the brower , this URL is not loaded on de default page. if i change the paremeter from "defaultPref" to "pref" or " lockPref" in the .cfg this work, but the end user doesn't may change the value and we need to let the choise at the end users to change if they want. Can you help me to solve this issue. king regards. Mr SUEUR.

Additional System Details

Application

  • User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36

More Information

FredMcD
  • Top 10 Contributor
4258 solutions 59615 answers

Helpful Reply

What's your computer system and Firefox version?

I take it you are talking about the page that Firefox opens to when it starts. We call this the start page. The homepage is what we call the page that comes up when you press the home icon.

You can set the startup and home pages however you want. But there are bad programs and add-ons that can change those without your knowing.

Start Firefox in Safe Mode {web link} by holding down the <Shift> (Mac=Options) key, and then starting Firefox.

A small dialog should appear. Click Start In Safe Mode (not Refresh). Is the problem still there?

If your chosen page comes up, the problem is an add-on. If you still get the page you don't want, then its likely ad-ware.

Further information can be found in this article; https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-caused-malware?cache=no

Run most or all of the listed malware scanners. Each works differently. If one program misses something, another may pick it up.

What's your computer system and Firefox version? I take it you are talking about the page that Firefox opens to when it starts. We call this the start page. The homepage is what we call the page that comes up when you press the home icon. You can set the startup and home pages however you want. But there are bad programs and add-ons that can change those without your knowing. [https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode Start Firefox in Safe Mode] {web link} by holding down the '''<Shift> ''(Mac=Options)''''' key, and then starting Firefox. A small dialog should appear. Click '''Start In Safe Mode''' (not Refresh). Is the problem still there? If your chosen page comes up, the problem is an add-on. If you still get the page you don't want, then its likely ad-ware. Further information can be found in this article; https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-caused-malware?cache=no Run most or all of the listed malware scanners. Each works differently. If one program misses something, another may pick it up.

Question owner

thansk for the return, this is on a Windows 7 client and firefox 56.0.2 (64 bits).

this is on new computer without add-in or mal-ware... this is in a company contexte with a .cfg configuration file deployed.

I talk about the start page ( the first default page open when you start firefox). and i set this parameter in the cfg file .

if i set : defaultPref("browser.startup.homepage", "https://my-site-url.org"); and i see in the about:config, this right setted in default with the good url but this not work the default page at start is blank.

when i set Pref("browser.startup.homepage", "https://my-site-url.org"); this parameter is right applicate in about:config in set user whith the right url yet, ans in this case when i start firefox the first page at start is right open whith the URL i setted, but is this configuration , if the user change the value , a the next start his setting is cleaned and my "https://my-site-url.org" is forced.

i need to set this url fort the start page bu default, but i need to allow the user to change if he want.

thansk for the return, this is on a Windows 7 client and firefox 56.0.2 (64 bits). this is on new computer without add-in or mal-ware... this is in a company contexte with a .cfg configuration file deployed. I talk about the start page ( the first default page open when you start firefox). and i set this parameter in the cfg file . if i set : '''defaultPref'''("browser.startup.homepage", "https://my-site-url.org"); and i see in the about:config, this right setted in default with the good url but this not work the default page at start is blank. when i set '''Pref'''("browser.startup.homepage", "https://my-site-url.org"); this parameter is right applicate in about:config in set user whith the right url yet, ans in this case when i start firefox the first page at start is right open whith the URL i setted, but is this configuration , if the user change the value , a the next start his setting is cleaned and my "https://my-site-url.org" is forced. i need to set this url fort the start page bu default, but i need to allow the user to change if he want.
FredMcD
  • Top 10 Contributor
4258 solutions 59615 answers

https://support.mozilla.org/en-US/kb/how-to-fix-preferences-wont-save

Note: Some software, like Advanced SystemCare with Surfing Protection, can protect files in the Firefox profile folder against changes. If you have such software then check the settings or uninstall this software.

https://support.mozilla.org/en-US/kb/how-to-fix-preferences-wont-save '''Note:''' Some software, like Advanced SystemCare with Surfing Protection, can protect files in the Firefox profile folder against changes. If you have such software then check the settings or uninstall this software.

Question owner

in fact is this KB i used :

https://developer.mozilla.org/en-US/Firefox/Enterprise_deployment

and it say:

pref sets the preference as if a user had set it, every time you start the browser. So users can make changes, but they will be erased on restart. If you set a particular preference this way, it shows up in about:config as "user set". defaultPref is used to alter the default value, though users can set it normally and their changes will be saved between sessions. If preferences are reset to default through the GUI or some other method, this is what they will go back to. Appears in about:config as "default".

in my case i need to use " defaultPref" but in my case , the url on the startpage is blank . so the parameter is rihgt set ( see the picture in attachement)

in fact is this KB i used : https://developer.mozilla.org/en-US/Firefox/Enterprise_deployment and it say: pref sets the preference as if a user had set it, every time you start the browser. So users can make changes, but they will be erased on restart. If you set a particular preference this way, it shows up in about:config as "user set". defaultPref is used to alter the default value, though users can set it normally and their changes will be saved between sessions. If preferences are reset to default through the GUI or some other method, this is what they will go back to. Appears in about:config as "default". in my case i need to use " defaultPref" but in my case , the url on the startpage is blank . so the parameter is rihgt set ( see the picture in attachement)
FredMcD
  • Top 10 Contributor
4258 solutions 59615 answers

I called for more help. However,

A post was flagged as Solved Problem. If the problem is not solved, please remove that flag. If you don’t, others that can help may not read this post.

Go to that message, and use the Undo link to its right.

I called for more help. However, A post was flagged as '''Solved Problem.''' If the problem is not solved, please remove that flag. If you don’t, others that can help may not read this post. Go to that message, and use the '''Undo''' link to its right.
cor-el
  • Top 10 Contributor
  • Moderator
17534 solutions 158551 answers
This specific can be localized and such a pref needs special treatment when you set its default value. *https://mike.kaply.com/2012/03/15/customizing-firefox-default-preference-files/ *https://mike.kaply.com/2012/08/29/setting-the-default-firefox-homepage-with-autoconfig/

Question owner

Thanks a lots for all informations.

first of all, i watched in the directory "browser" and on us version i do not have "/defaults/preference".

And the second, i try defaultPref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=http://mike.kaply.com");

and this doens't work. In reply on the threat i read from Mike Kaply:

Apparently defaultPref is broke in current Firefox builds and we are just now discovering it.

Thanks a lots for all informations. first of all, i watched in the directory "browser" and on us version i do not have "/defaults/preference". And the second, i try defaultPref("browser.startup.homepage", "data:text/plain,browser.startup.homepage=http://mike.kaply.com"); and this doens't work. In reply on the threat i read from Mike Kaply: Apparently defaultPref is broke in current Firefox builds and we are just now discovering it.
cor-el
  • Top 10 Contributor
  • Moderator
17534 solutions 158551 answers

See also:

  • bug 947838 - Autoconfig's defaultPref() has no effect when distribution.ini exists

(please do not comment in bug reports
https://bugzilla.mozilla.org/page.cgi?id=etiquette.html
)

See also: *[https://bugzilla.mozilla.org/show_bug.cgi?id=947838 bug 947838] - Autoconfig's defaultPref() has no effect when distribution.ini exists (<i>please do not comment in bug reports<br>https://bugzilla.mozilla.org/page.cgi?id=etiquette.html</i>)

Question owner

thanks for this way, but in this thread , the bug not set the value in about:config.

In my case, the value is right set in default statu with the right URL setted in the about;config by the command line in .cfg file, but at the firt start , the page not open with the url setted ( screenshot in the attachement of a message up above)

thanks for this way, but in this thread , the bug not set the value in about:config. In my case, the value is right set in default statu with the right URL setted in the about;config by the command line in .cfg file, but at the firt start , the page not open with the url setted ( screenshot in the attachement of a message up above)