X resources are case-sensitive. The xterm manual documents this as
selectToClipboard (class SelectToClipboard)
Tells xterm whether to use the PRIMARY or CLIPBOARD for SELECT
tokens in the selection mechanism. The set-select action can
change this at runtime, allowing the user to work with programs
that handle only one of these mechanisms. The default is
"false", which tells it to use PRIMARY.
The feature was added to xterm in patch #209 (2006). It is not an optional feature. So (assuming you have typed the command-line as given), there are a few possibilities to check:
The -v
version option of xterm will have it print a one-line message showing the patch-level along with the configuration for which it was compiled, e.g.,
XTerm(261)
The feature can be set/reset using an escape sequence, as noted in XTerm Control Sequences:
CSI ? Pm h
DEC Private Mode Set (DECSET).
...
Ps = 1 0 4 1 -> Use the CLIPBOARD selection. (This enables
the selectToClipboard resource).
Your shell initialization may have something which sends this sequence.
The xrdb -query
is one way to check for resource-settings, but it is not infallible. A better tool would be appres
, e.g.,
appres XTerm
appres UXTerm
depending on whether xterm is run with/without the UXTerm
application defaults. In contrast to xrdb
, appres
shows resource settings after taking into account the "app-defaults" files. (It does not see resources applied only to an instance of xterm such as the -xrm
option).
tmux has a feature which can interfere with selections (whether to primary or clipboard). That is called set-clipboard
, and is commented upon here: