Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings: Safari: Enable Developer Mode #26

Open
bramus opened this issue Dec 3, 2021 · 1 comment
Open

Settings: Safari: Enable Developer Mode #26

bramus opened this issue Dec 3, 2021 · 1 comment
Labels

Comments

@bramus
Copy link
Owner

bramus commented Dec 3, 2021

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 bramus added bug Something isn't working enhancement New feature or request needs investigation and removed bug Something isn't working labels Dec 3, 2021
@bramus
Copy link
Owner Author

bramus commented Dec 3, 2021

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 :-/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant