【发布时间】:2017-03-07 10:08:16
【问题描述】:
我正在尝试更改一些 Safari 设置并尝试为此使用 com.apple.Safari.plist。
这些是我需要更改的以下关键值
com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaScriptEnabled
WebKitJavaScriptEnabled
com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaScriptCanOpenWindowsAutomatically
WebKitJavaScriptCanOpenWindowsAutomatically
com.apple.Safari.ContentPageGroupIdentifier.WebKit2PluginsEnabled
WebKitPluginsEnabled
WebKitJavaEnabled
我尝试使用
更改第一个defaults write com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaScriptEnabled -bool true
它没有改变值。我需要一些帮助来理解为什么以及如何纠正它。
我也想要一些关于如何访问这个值来改变字符串值的帮助
<key>ManagedPlugInPolicies</key>
<dict>
<key>PlugInName</key>
<dict>
<key>PlugInDisallowPromptBeforeUseDialog</key>
<true/>
<key>PlugInFirstVisitPolicy</key>
<string>PlugInPolicyAllowNoSecurityRestrictions</string>
</dict>
</dict>
如何更改 PlugInFirstVisitPolicy 的值?我想把字符串改成别的。
除了默认写入之外,还有其他方法吗?我读过 plistbuddy 但不知道如何使用它。非常感谢任何帮助。谢谢。
注意:我有第一部分
我使用 PlistBuddy 来设置我想要的值
/usr/libexec/PlistBuddy -c "Set com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaScriptEnabled true" ~/Library/Preferences/com.apple.Safari.plist
对于其他值,依此类推。 但我仍然不知道如何在问题的第二部分访问容器中的那个。请帮忙。
【问题讨论】:
标签: bash macos terminal safari plist