Skip to content

Instantly share code, notes, and snippets.

@kamiller
Last active December 19, 2015 10:29
Show Gist options
  • Save kamiller/5941023 to your computer and use it in GitHub Desktop.
Save kamiller/5941023 to your computer and use it in GitHub Desktop.
set ubuntu firefox default homepage

Firefox

Set default home page edit /etc/firefox/syspref.js

At the bottom of the file add:

user_pref("browser.startup.homepage", "http://google.com");

Obviously change "http://google.com" to the page of your choice (or not).

This change will not affect existing firefox profiles for existing users. You can reset all users home pages with

sudo sed -i -e '/startup.homepage/d' /home/*/.mozilla/firefox/*/prefs.js

change "/home/*" to "~user_name" for a single user.

sudo sed -i -e '/startup.homepage/d' ~bodhi/.mozilla/firefox/*/prefs.js

Lock home page

You can lock the home page for all users by editing /etc/firefox/syspref.js and using

lockPref("browser.startup.homepage", "http://google.com");

Although again this does not affect existing profiles, you would need to run the sed command again ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment