Preferences changes using “defaults” not applied

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

enter image description here

Using diff and defaults read, I found that the settings is “TrackpadThreeFingerTapGesture” in “”.

When the checkbox is checked, “defaults read 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 TrackpadThreeFingerTapGesture -int 0
defaults read 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?

All topic