Modify Trackpad Right click via command line without logout Is it possible to toggle the the preference setting under Trackpad labeled Secondary Click without logging out and in, so that I can toggle two-finger right-click for the builtin trackpad?

I found the command

defaults -currentHost write NSGlobalDomain com.apple.trackpad.enableSecondaryClick -bool true

But that doesn't seem to work. Toggling the checkbox does also seem to change ~/Library/Preferences/com.apple.driver.AppleBluetoothMultitouch.trackpad.plist when system preferences is closed, but using defaults to change that doesn't help either. 

I'd like to toggle it multiple times in one session without going through system preferences, so logging out and back in isn't preferable.
I think you would need to reload the kext for it

sudo kextunload /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTrackpad.kext to disable it. 

Change kextunload to kextload to re-enable it.

Now create a script from above so you can run it with one click.

Sorry, that was for the external trackpad.

For the internal that would be to unload:

sudo kextunload -b com.apple.driver.AppleUSBMultitouch; sudo touch /system/library/extensions ; exit