Skip to content


XSel, for command-line operations on X selections

Since I first learned that Windowmaker installs two command-line tools, wxcopy and wxpaste, to play around with X selections, I have wanted to be able to make and use X selections from my Bash shell. wxcopy and wxpaste never did what I expected them to do, so I gave up until recently I learned about all the different X selections. Read More »

Copy-pasting to and from XTerms

By default, XTerms only supports the PRIMARY selection for copy and paste. The PRIMARY selection is the one that is used by most ‘modern’ X application when you select text. This text can then usually be pasted by clicking the middle/second mouse button. Because this selection is set whenever you select, it's easily overwritten, often accidentally. That's why most newer X apps offer a parallel copy/paste mechanism where the selection is only explicitly set by choosing “Cut” or “Copy” from the application's “Edit” menu or from its context menu (or with the Control-X/C/V keyboard shortcuts). In X, this selection is called CLIPBOARD, just like in Windows where it's the only selection. Read More »