Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We have several hundred MacBooks on campus, all managed by us. We're hoping to find an easy(ish) way of setting the homepage across all of them, all at once. The catch is, there are a variety of flavours of browser in use - some users like Firefox, some Safari, some Chrome. The Macs are running a mixture of 10.6 and 10.7.

Safari is pretty easy to do: defaults write HomePage

Firefox is also fairly easy, using a user.js file in their profile directory - however, that profile resides in ~/Library/Application Support/Firefox/Profiles/xxxxxx.default, where xxxxxx is a random, six-digit string. We can't work out a way to easily place user.js into each user's profile.

Google Chrome is an odd one - ~/Library/Application Support/Google/Chrome/Default/Preferences seems to be where the homepage string resides - However I don't really want to just drop a whole new preferences file in there, as this will reset other settings that the user has.

Does anyone know of a way to set the homepage easily across all three browsers, all at once? Ideally we'd be able to create a .pkg and deploy it.

thankyou for your assistance!

share|improve this question

Two ways to set this up on Chrome:

  1. Set MCX preferences using the Workgroup Manager to configure the RestoreOnStartupURLs policy. See
  2. Set a master preferences file with the desired homepage/startup URLs, and it will be automatically imported for new chrome profiles.

More details on both solution at

share|improve this answer

I don't know if sed and grep behaves the same way in Linux and MacOS, but let's try.

For Chrome you can do that using sed:

sed -i ~/Library/Application Support/Google/Chrome/Default/Preferences -e 's/"homepage"*/"homepage": ""/'

For Firefox, you can use the same trick:

USERDIR=`grep 'Path' profiles.ini | cut -d'=' -f2`
sed -i $USERDIR -e 's/user_pref("browser.startup.homepage".*,user_pref("browser.startup.homepage", "");/'

And for Safari you already did it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.