I setup Safari how I wanted on a test machine and then grabbed the .plist.
Then I uploaded it into custom settings in a config profile. Works from my testing without issues.
Seemed to be the smoothest rollout for me.
I set mine up on the Computer Management settings during the images... I've seen that has been working for me no problem..
It's a little learning and I would guess that this is how the JSS manages it...
https://managingosx.wordpress.com/2015/02/02/command-line-tools-via-python-and-cocoa/
Is what I am doing...
C
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:
https://github.com/amsysuk/public_config_profiles/blob/master/SafariHomepage.mobileconfig
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.
Thanks,
Eric
Maybe this?, it still works for me.
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.
Thanks,
Eric
@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).
Eric
@etippett Thanks for the response! If I find anything that looks remotely like a fix, I'll be sure to post it back here. I fear the worst however! thanks again.
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.
thanks davidacland that worked for me!
So has anyone figured out where the "homepage" key is now stored?
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?
Tried same settings via a profile?
Any progress on a solution or a location? I have tried configs and plists. Does anyone know it is works in profile manager? If so I wonder if a downloaded config from profile manager would work.
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.
@jwolf this appears to be working, thanks! Saved my bacon.
Thanks @jamesreynolds it looks like the LastSafariVersionWithWelcomePage-v2 setting fixed it for me. I am setting the defaults at login via script successfully. I may however try adding this to PM and see what happens.