10/15/14

Firefox command-line arguments to set and control start page

Jasonwryan gave you what is probably the best solution. If you reall want to change the default home page (not simply start with a specific page, but change what page the Home button loads), you will need to edit your user's config file.
For firefox, the preferences are stored in
$HOME/.mozilla/firefox/RANDOM_STRING.default/prefs.js
The RANDOM_STRING is different for each user profile. The default home page is saved as:
user_pref("browser.startup.homepage", "http://foobar.com");
So, to change the homepage to foo.com from the command line you could do:
sed -i.bak '
 s#\(\"browser\.startup\.homepage\", \"\)http:.*"#\1http://foo.com\"#
' $HOME/.mozilla/firefox/*.default/prefs.js

No comments: