What is the currently working and recommended means of setting the homepage in Safari for all users?
I've tried various different methods including login scripts and custom settings in a config profile but so far had no luck. It might be the syntax's I've used but wanted to just double check what everyone else is using these days?
I'm dealing wth Safari 9..0.3 on 10.11.4 with JSS 9.91.
I've been messing with this for most of the day with no luck so think it's time to reach out for help! :-)
Guys, as of 10.11.5, the Homepage field in com.apple.safari is gone. I've been ripping my hair out trying to figure out where Safari is hiding the homepage value. I don't use profile manager, however, I alter the default profile in OS X. This has been working flawlessly for years but I can no longer set the Safari homepage in the default profile anymore.
Does anyone have any tips?
Hi @nkuhl30 I can't seem to find the key in the plist file but using a custom configuration profile still works. Here's a link to the one we use:
This is driving me mad too. I also don't use a profile manager, and had previously set the homepage in OSX via the default profile without issue. It has worked for years until now. If anyone comes up with a way to address this (using traditional methods, i.e. editing a plist file), it would be greatly appreciated! If I find an answer, I'll post back here. Good luck!
@seanboy Did you ever find a solution? I'm running into this problem now as well. We have a default user that our lab computers automatically login as. On logout, its home folder is wiped and rebuilt from a custom user template. Even though I created that template by setting up the user as I wanted (with Safari home page properly set) and then ditto'ed that folder to the system user templates directory, the home page is not correct after the user home is rebuilt.
So what I ended up discovering is that even though Safari does not write the HomePage key into com.apple.Safari.plist when you set the home page in the browser preferences, it does still respect that key if you write it using the defaults command.
I'm still tremendously confused as to where Safari stores the home page setting on its own, though. Our lab computers automatically login as a user whose home folder is wiped and rebuilt from a custom user template at each logout via a script. Even though we go through the process of setting all settings while logged in as this user and then copying the entire home folder to our custom template, this did not preserve the home page setting, leading me to believe that it's either not in the home folder or it's somehow tied to the system on which it is set. Hopefully I'll have more time to dig into this soon and figure it out.
@etippett Unfortunately I am still banging my head against a wall trying to get this working. I tried manually entering a HomePage key into the safari plist file but that didn't take. Did you get it working? I can't believe there are not more forums about this out there, we can't be the only ones who use default profiles in this way! :)
@seanboy Yes, it is working for me, but I think my scenario is slightly different. You're only writing the HomePage key into the Safari plist of the default user template (English.lproj or other) right? I copied a fully configured (all keys, including a manually written HomePage) plist into the user template (a custom one that is only used for the specific user as which our lab machines auto-login).
If you look at a full Safari plist, you'll see it's littered with keys about has this setting been migrated or what was the last OS version on which Safari was launched. My guess is that one or more of these have something to do with the transition between using the HomePage key in the plist and wherever that setting is stored now. If the plist in your template in fact has only the HomePage key, my guess is that this causes the transition process to be triggered and the HomePage key to be ignored. In my situation, the plist presumably tells Safari the migration has already taken place and for whatever reason this allows the HomePage key to be respected (this seems rather contradictory, to the point of being a bug).
This is all speculation but it's the only explanation I can come up with. I fully expect this to not work much longer, but it got me through the start of the school year and bought me some time to figure out a permanent solution (probably a config profile, unfortunately).
If you change the defaults on com.apple.Safari in English.lproj, the settings will be migrated into new user accounts. At least it worked for me.
sudo defaults write /System/Library/User Template/English.lproj/Library/Preferences/com.apple.Safari AlwaysRestoreSessionAtLaunch -bool false
sudo defaults write /System/Library/User Template/English.lproj/Library/Preferences/com.apple.Safari NewWindowBehavior -integer 0
sudo defaults write /System/Library/User Template/English.lproj/Library/Preferences/com.apple.Safari HomePage -string "http://www.yoursite.com/"
I was copying the com.apple.Safari.plist from my admin account to the "/System/Library/User Template/English.lproj/Library/Preferences", and that didn't work because the keys above were gone... already migrated to whatever secret location Apple has moved them to. Adding them manually into the plist appears to work.
Love to figure this out as well! I made a package before with the safari pref in Preferences folder and lastsession.plist file in /Library/Safari in user template folder and thought that fixed fixed it before. Not working today with creating a new package. Thank you Apple! Has anyone filed bug reports?
You can set the homepage by setting HomePage and LastSafariVersionWithWelcomePage-v2 (I used the value <string>9.0</string> for 10.11).
I have found where Safari is storing it's own home folder setting. It's in the directory "~/Library/Keychains/<hardware uuid>", which is listed as "Local Items" in Keychain Access. These are encrypted settings that are eligible for iCloud syncing. If you enable iCloud then the Local Items will be replaced with an 'iCloud" keychain.
This was extremely difficult to confirm. I had to create multiple accounts, copy the folder from one home folder to another, reboot, then I observed the homepage setting moved from one user to another (after unlocking the keychain using the 1st user's password).
Long story short, I don't think we are going to be able to modify the home folder setting the way that Safari manages it. But if you set both HomePage and LastSafariVersionWithWelcomePage-v2 then it will work.