home of the madduck/ blog/
X cut-'n'-paste gripe

I sometimes wonder how amazingly b0rken the X window system is, and most of the time it's me swearing about cut-and-paste. Or is it by design that I open a terminal, select some text, close the terminal, and find the paste buffer to be empty? I can't imagine...

I'll leave it at that for now and won't bitch about Firefox, OpenOffice.org, and most GTK apps with respect to pasting what I previously copied by selecting stuff with the mouse.

Update: many people responded, pointing me to clipboard managers that work around the basic design limitation, because X "cut-n-paste" is actually more of a "drag-n-drop" implementation. Chris Siebenmann explained it best:

The short answer is 'by (bad) design'. The X people were reacting to the problem of not wanting to shove (potentially) large amounts of data into the X server and require the X server to hold onto things, so they designed cut & paste (the second time around) so that the program that created the cut had to hold onto the data.

The longer answer, with some history, is at : http://utcc.utoronto.ca/\~cks/space/blog/sysadmin/XCutAndPasteHistory

In retrospect it's probably an over-engineered solution, and it does have the big flaw you ran into. (Arguably everything from that era of X is very complicated and overengineered.)

Other than that, I've also been pointed to the FreeDesktop ClipBoard standard. Somehow I doubt this will have any influence on Fluxbox in the short run.