OSX, XQuartz, Xterm Paste

Something that has been annoying me for a while is OSX’s X implementation’s behavior when trying to paste into an Xterm. Using the usual hotkey doesn’t paste as you’d expect (though, oddly, copy does work). After a perusal of the man page, it turns out this is rather easy to fix:

First, quit X and run these commands:

defaults write org.x.X11 sync_pasteboard_to_primary -boolean true
defaults write org.x.X11 sync_pasteboard_to_clipboard -boolean true
defaults write org.x.X11 sync_pasteboard -boolean true
defaults write org.x.X11 enable_fake_buttons -boolean true

Then you can restart X, and you should find that holding down the Option key and clicking (one finger) in the Xterm will paste (as you’d expect on most other *NIX boxes)