Iceweasel: Change default/home page via command line

iceweasel

I'd like to change the home/default page (which is shown at startup).
I know how to change it in the iceweasel GUI (preferences), but I'd like to change it remotely via SSH.

Is there a config file which contains the default page?

EDIT:
I need it as stored configuration, so that on every reboot the configured page is shown

Best Answer

The home page is defined by the browser.startup.homepage preference.

Before Firefox is used the first time, this can be defined in a file in the default preferences, e.g. /usr/share/iceweasel/browser/defaults/preferences/ on Debian or /usr/lib64/firefox/browser/defaults/preferences/ on Fedora. There should already be a .js file there; replace prefs("browser.startup.homepage", "..."); in that file with the value you want, or add a new line if there is no such line already.

Once Firefox has been used once, the value is defined in the user profile's prefs.js file, e.g. in ~/.mozilla/firefox/profile.default/prefs.js (replacing profile with the appropriate value), in the same way as above. (There may be other profiles alongside the default one.)

Related Question