something you always ...... about the X11 clipboard(s)
René J.V. Bertin
rjvbertin at gmail.com
Tue Mar 31 13:29:43 PDT 2015
This is something I've always wondered to know but was a wee bit afraid to ask:
how do the different X11 clip and paste boards interact with the other cutbuffers (etc)?
One reason I use xterms for so much of my command line tinkering is how double clicking selection works (full paths, for instance) and copies the selected content at once to a clipboard or cutbuffer (CLIPBOARD?). Even before I found myself using mouses without 3 proper buttons I defined a shortcut (that can be made with 1 or 2 hands) to paste that content back into the terminal ("Meta <KeyPress>Left: insert-selection(CLIPBOARD,CUT_BUFFER0)").
With XQuartz and the X11.app from MacPorts I find myself configuring the server to have sync enabled, but from the other options I activate only "update PRIMARY when Pasteboard changes". With all other combinations I tried I find that I lose the contents of the CLIPBOARD, and that doubleclicking also no longer copies to it.
For xterm work this compromise works well enough because I can still use pbpaste and pbcopy, and the Copy item in the Edit menu. I actually like that this gives me 2 clipboards that don't (usually) interfere.
It's less than ideal when I start doing things in GTk-based applications, applications using Qt5's xcb platform plugin ("qt5-x11") or any other X11 application that aims to provide a "modern" copy/paste experience.
I'll admit that I never taken the trouble to master X11's clipboard and cutbuffer or its clipboard managers in detail (read: hardly at all). Is there a setting where I could have a somewhat better integration, but where at least copying to the CLIPBOARD (through double-click) continues to work (and ideally, the OS X clipboard doesn't automatically overwrite the CLIPBOARD contents when I hit Command-C somewhere in a Cocoa app)?
PS: if the terminology wasn't already confusing enough, the X11 preferences dialog makes it a step worse by suggesting they're personalities with a will of their own ("Update [the?!] Pasteboard when [the?!] CLIPBOARD changes") ;)
More information about the macports-users