Skip to content
Advertisement

xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection

I’ve tried various ways to coerce xterm (versions 285 and 292) to copy the selection to the CLIPBOARD clipboard whenever I press Ctrl-Shift-C. The most promising way thus far has been, in ~/.Xresources, to put this:

XTerm*vt100.translations: #override 
    Ctrl Shift <KeyPress> C:  copy-selection(CLIPBOARD) n
    Ctrl Shift <KeyPress> V:  insert-selection(CLIPBOARD)

Ctrl-Shift-V works perfectly, but the copying has a nuance…

If I restart xterm, highlighting text puts things in the PRIMARY clipboard; this is expected, proper, default behavior. If I hit Ctrl-Shift-C, it properly copies the current selection to CLIPBOARD clipboard.

The bug, however, is that if you highlight text after the first time you pressed Ctrl-Shift-C, you’ll see that highlighting now copies to both PRIMARY and CLIPBOARD. I cannot figure out how to stop xterm from updating CLIPBOARD upon selection… and it doesn’t make sense to me that it would do it in the first place.

I said, at a specific point in time, to copy the selection to the clipboard… yet it just starts updating it automatically upon selection after doing it once…

Anyone have a workaround?

Advertisement

Answer

You might find Bug588785 interesting to read. A quick workaround would be to install and use xclipboard as seen in Comment 145.

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement