Set Home Page in a Browser

tpeterson
New Contributor

Does anyone have a script or way to set the home page in Firefox, Safari etc.

8 REPLIES 8

talkingmoose
Moderator
Moderator

The jamf binary has that feature already or you can set the homepage when creating a configuration.

Launch the Terminal application and enter "jamf help". You'll see a "setHomePage" option. To get the specifics you can enter "jamf help setHomePage". The script syntax would be something like:

jamf setHomePage -homepage "http://www.example.com" -fut -skipSafari

Of course, you probably don't want to skip Safari but you do probably want to fill the User Template (FUT) so that future users of the machine are preset.

mscottblake
Valued Contributor

This can mostly be accomplished with Managed Preferences.

You can set Safari by using the HomePage key in the com.apple.Safari domain.
You can set Chrome by using the HomepageLocation in the com.google.Chrome domain.
Firefox cannot be managed by MCX at all. You need to use the pref() functions to set it.

GabeShack
Valued Contributor III

Does anyone know what the actual command or script that jamf runs to set this setting? It looks like it creates a com.apple.Safari.plist file and then puts the HomePage String in. I want to modify this to add a line for the new window behavior, but am unsure how to script it.

Gabe Shackney
Princeton Public Schools

Gabe Shackney
Princeton Public Schools

bentoms
Release Candidate Programs Tester

GabeShack
Valued Contributor III

Since we generally use Configuration Profiles I tend to not use MCX as I've seen this cause some conflicts in the past.

Gabe Shackney
Princeton Public Schools

Gabe Shackney
Princeton Public Schools

bentoms
Release Candidate Programs Tester

Could you then script it or maybe create a custom profile with the settings linked?

denmoff
Contributor III

For Firefox, I believe you can use an extension called CCK Wizard.

GabeShack
Valued Contributor III

I was playing with scripting a change to the User Template however once I make that change it seems to break the keychain and messes with permissions when it creates new users.

Still testing though...

Gabe Shackney
Princeton Public Schools

Gabe Shackney
Princeton Public Schools