Copying data between applications is perhaps one of the most widely misunderstood concept under X11. There are two major ways to copy data between X11.

Copy and Paste

This is like MicrosoftWindows / MacOS Copy and Paste. First you select the data you want to copy, you select "Copy" from a menu, (or use a keyboard shortcut), move to the new application and select paste. This is /not/ to be confused with Selection and Paste.

Drag and Drop / The Primary Selection

This is where you select some data, then drag the data from the old application into it's new location and release the mouse button. This is also like Windows and MacOS.

However, X11 has an interesting twist on this. Since dragging data between applications is difficult if one is under the other, or on a different virtual desktop, X11 also lets you select some data, switch to the new application then paste the primary selection, which is usually bound to the middle mouse button. The primary selection is the most recently selected data. This is not stored in the clipboard, and does not overwrite data that is stored in the copy and paste buffer used above. Users seem to confuse this use with Copy and paste above, where it is a modification on Drag and drop instead.

See also CutAndPaste and DragAndDrop.

See the "STDIN Forwarding" section in SSHNotes for CopyingData between machines using SSH.