Setting multiple home tabs via terminal

WUSLS
New Contributor

Hi All,

Does anyone know how to set 2 default home tabs in Safari? I know there is the manual way, but I am not sure of the syntax to use to get it to work. Below is what I have.

Command: defaults write ~/Library/Preferences/com.apple.Safari HomePage -string https://web.com,%20https://web2com

2 REPLIES 2

stevewood
Honored Contributor II
Honored Contributor II

@WUSLS in my very limited testing (on Mavericks) shows that you need to set two keys: NewWindowBehavior and NewWindowTabsIdentifier. I had to create a bookmark folder that contained the tabs that I wanted, then used defaults write to set the Behavior and Identifier keys:

defaults write ~/Library/Preferences/com.apple.Safari.plist NewWindowBehavior 5
defaults write ~/Library/Preferences/com.apple.Safari.plist NewWindowTabsIdentifier 22BB2FA0-739D-486A-9572-F53DE49

Now obviously that Identifier string will be different for you, but once you have it that should set the tabs for startup. Getting the tabs you want bookmarked is a different story. I didn't do any testing on that yet.

HTH

WUSLS
New Contributor

Thanks for the information. Much appreciated! Sorry for the late response.