I have a key with values that I'd like to insert into
.GlobalPreferences.plist. I've been able to insert these via the following steps:
mkdir ~/tmp; cd ~/tmp cp /path/to/some.plist ~/tmp/ cp ~/Library/Preferences/.GlobalPreferences.plist ~/tmp/ #Convert from binary plist to xml: plutil -convert xml1 .GlobalPreferences.plist #Merge some values into the plist: /usr/libexec/PlistBuddy -x -c "Merge some.plist :ProperlyNamedKey" ~/tmp/.GlobalPreferences.plist #Test to make sure values have been inserted to key: /usr/libexec/PlistBuddy -x -c "Print :ProperlyNamedKey" #Reencode to binary plist: plutil -convert binary1 .GlobalPreferences.plist cp .GlobalPreferences.plist ~/Library/Preferences/
The key and accompanying values are merged fine, but when I
cp the .GlobalPreferences.plist back over to the Preferences folder, the changes do NOT show up. When I
sudo reboot the changes also vanish and no longer show up in the .GlobalPreferences.plist nor in
Is there a way to force macOS to accept and activate .GlobalPreferences.plist changes immediaely and such that the attempted changes are not wiped out?