Discussion:
Bypassing about:home/privacy page loads on new test profile builds via mach
Kyle Machulis
2018-10-22 22:53:43 UTC
Permalink
I've got some gecko checkouts set in debug mode that I often have to
rebuild, meaning their test profile may be removed/regenerated at times.
Bringing up a new firefox profile with the default about:home and privacy
warnings can take a while. Thanks to some help from nalexander in #build,
I've figured out how to make it so new profiles only come up with a single
about:blank tab. This method requires using './mach run' for starting the
instance.

If you create a machrc file in ~/.mozbuild like so

mach settings > ~/.mozbuild/machrc
There will be a [runprefs] block in there that is used whenever 'mach
run' is used to start the browser.

Adding the following prefs turns off all new profile about:home loads
and just starts the browser with about:blank:

[runprefs]
browser.startup.blankWindow=true
browser.newtabpage.enabled=false
browser.startup.firstrunSkipsHomepage=true
browser.startup.homepage=about:blank
datareporting.policy.dataSubmissionPolicyBypassNotification=true
Cameron McCormack
2018-10-28 20:29:19 UTC
Permalink
Post by Kyle Machulis
Adding the following prefs turns off all new profile about:home loads
[runprefs]
browser.startup.blankWindow=true
browser.newtabpage.enabled=false
browser.startup.firstrunSkipsHomepage=true
browser.startup.homepage=about:blank
datareporting.policy.dataSubmissionPolicyBypassNotification=true
This is great, thanks for the tip Kyle!
Brian Grinstead
2018-11-09 22:36:45 UTC
Permalink
Thanks for the list, that looks like a nice set of defaults. I wanted to add a few related things:

- In addition to setting prefs via machrc you can use `--setpref`. For example `./mach run --setpref browser.newtabpage.enabled=false` which would then override the value in your machrc file. Both ways to change prefs were added in https://bugzilla.mozilla.org/show_bug.cgi?id=1172574 <https://bugzilla.mozilla.org/show_bug.cgi?id=1172574> so they behave similarly.
- You can use `./mach run --temp-profile` which is very handy for running multiple profiles at once. That will make a temporary profile folder in your objdir and then inherit prefs from the machrc file and setpref arg.
- `./mach settings` will print out all the available sections of the machrc file.

Brian
Post by Cameron McCormack
Post by Kyle Machulis
Adding the following prefs turns off all new profile about:home loads
[runprefs]
browser.startup.blankWindow=true
browser.newtabpage.enabled=false
browser.startup.firstrunSkipsHomepage=true
browser.startup.homepage=about:blank
datareporting.policy.dataSubmissionPolicyBypassNotification=true
This is great, thanks for the tip Kyle!
_______________________________________________
dev-platform mailing list
https://lists.mozilla.org/listinfo/dev-platform
Loading...