I'm a CLI enthusiast and, as such, I've been a extensive user of brew, cask, m, mas, softwareupdate and so on. I've even written some tutorials about them (check here and there).
Right now, I'm diving into defaults to alter my settings.
My problem is that some defaults set in CLI don't appear in GUI. For instance, I try to deactivate "three fingers lookup & data detectors" in System Preferences > Trackpad
Using diff and defaults read, I found that the settings is "TrackpadThreeFingerTapGesture" in "com.apple.AppleMultitouchTrackpad".
When the checkbox is checked, "defaults read com.apple.AppleMultitouchTrackpad TrackpadThreeFingerTapGesture" returns 2. That's the default value.
When it's no checked, it returns 0. That's what I want.
To test this out, I checked the setting in the GUI, then used these commands:
killall 'System Preferences'
defaults write com.apple.AppleMultitouchTrackpad TrackpadThreeFingerTapGesture -int 0
defaults read com.apple.AppleMultitouchTrackpad TrackpadThreeFingerTapGesture
The last commands returns 0, which is ok. But when I open the GUI, the checkbox is still checked! Reading the value again still gives me 0…
I even tried logging out after altering the value, the problem remains.
Can someone help?
Best Answer
The preference you wish to set is saved in
~/Library/Preferences/ByHost
, so you have to add the switch-currentHost
to thedefaults
commandTry the following code with
Value
set to0
, then set to2
and see the differencegives me
regards
Gerd