2017-03-07 2 views
0

일부 Safari 설정을 변경하려고하는데 com.apple.Safari.plist를 사용하려고합니다.
이는 내가plist 값을 설정하는 방법

defaults write com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaScriptEnabled -bool true 

그것은 값을 변경하지 않은 사용하여 첫 번째 변경 시도

com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaScriptEnabled 
WebKitJavaScriptEnabled 
com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaScriptCanOpenWindowsAutomatically 
WebKitJavaScriptCanOpenWindowsAutomatically 
com.apple.Safari.ContentPageGroupIdentifier.WebKit2PluginsEnabled 
WebKitPluginsEnabled 
WebKitJavaEnabled 

변경해야 다음 키 값입니다. 이유와 방법을 이해하기 위해서는 도움이 필요합니다.

그리고 또한 내가 문자열 값

<key>ManagedPlugInPolicies</key> 
<dict> 
    <key>PlugInName</key> 
    <dict> 
     <key>PlugInDisallowPromptBeforeUseDialog</key> 
     <true/> 
     <key>PlugInFirstVisitPolicy</key> 
     <string>PlugInPolicyAllowNoSecurityRestrictions</string> 
    </dict> 
</dict> 

을 변경하려면이 값에 액세스하는 방법에 대한 몇 가지 도움이 필요 어떻게 PlugInFirstVisitPolicy의 값을 변경하려면 어떻게해야합니까? 문자열을 다른 것으로 변경하고 싶습니다.

기본값을 쓰는 다른 방법이 있습니까? 나는 plistbuddy에 대해 읽었지만 그것을 사용하는 방법을 모르겠다. 어떤 도움을 주셔서 감사합니다. 감사.

참고 : 나는 첫 번째 부분
을 가지고 내가 다른 값을 그들에게 등

/usr/libexec/PlistBuddy -c "Set com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaScriptEnabled true" ~/Library/Preferences/com.apple.Safari.plist 

그리고 싶었 방법이 값을 설정하는 PlistBuddy을 사용했다. 하지만 질문의 두 번째 부분 인 컨테이너 내에서 액세스하는 방법을 여전히 알지 못합니다. 도와주세요.

답변

0

두 답변이 있습니다.
은 내가 마지막 허용 하였다 I가

/usr/libexec/PlistBuddy -c "Set ManagedPlugInPolicies:PlugInName:PlugInFirstVisitPolicy PlugInPolicyAllowNoSecurityRestrictions" ~/Library/Preferences/com.apple.Safari.plist 

사용 딕셔너리 체인을 액세스하려면

/usr/libexec/PlistBuddy -c "Set com.apple.Safari.ContentPageGroupIdentifier.WebKit2JavaScriptEnabled true" ~/Library/Preferences/com.apple.Safari.plist 

사용 임의 PLIST 값을 변경할 PLIST

의 값을 변경 PlistBuddy 사용 PlugInName은 항상 허용됩니다.