freshinstall icon indicating copy to clipboard operation
freshinstall copied to clipboard

Settings: Safari: Enable Developer Mode

Open bramus opened this issue 4 years ago • 1 comments

The old code no longer works

It should be possible to set similar options in ~/Library/Containers/com.apple.Safari/Data/Library/Preferences/com.apple.Safari.plist using PlistBuddy, but that file cannot be opened (without disabling SIP)

bramus avatar Dec 03 '21 08:12 bramus

According to https://lapcatsoftware.com/articles/containers.html one needs to:

  1. Grant Terminal Full Disk Access
  2. Remove the file ~/Library/Preferences/com.apple.Safari.plist

From then on, using defaults write will know that it should write the settings in the ~/Library/Containers/com.apple.Safari/Data/Library/Preferences/com.apple.Safari.plist file.

While this does seem to be the case, the settings are not picked up by Safari …

bramus in ~ λ rm ~/Library/Preferences/com.apple.Safari.plist

bramus in ~ λ defaults write com.apple.Safari IncludeInternalDebugMenu -bool true                                                                               
bramus in ~ λ /usr/libexec/PlistBuddy -c "Print :IncludeInternalDebugMenu" ~/Library/Containers/com.apple.Safari/Data/Library/Preferences/com.apple.Safari.plist
true

bramus in ~ λ /usr/libexec/PlistBuddy -c "Print :HomePage" ~/Library/Containers/com.apple.Safari/Data/Library/Preferences/com.apple.Safari.plist
http://www.apple.com/uk/startpage/
bramus in ~ λ /usr/libexec/PlistBuddy -c "Set :HomePage about:blank" ~/Library/Containers/com.apple.Safari/Data/Library/Preferences/com.apple.Safari.plist
bramus in ~ λ /usr/libexec/PlistBuddy -c "Print :HomePage" ~/Library/Containers/com.apple.Safari/Data/Library/Preferences/com.apple.Safari.plist          
about:blank

bramus in ~ λ /usr/libexec/PlistBuddy -c "Set :AutoOpenSafeDownloads true" ~/Library/Containers/com.apple.Safari/Data/Library/Preferences/com.apple.Safari.plist
bramus in ~ λ /usr/libexec/PlistBuddy -c "Print :AutoOpenSafeDownloads" ~/Library/Containers/com.apple.Safari/Data/Library/Preferences/com.apple.Safari.plist
true

All attempts above had no effect :-/

bramus avatar Dec 03 '21 13:12 bramus