I want to configure XTerm.
X resources I want to set
I want to change font and font size, as well as to enable copying and pasting to the clipboard instead of the “primary buffer” ( Copy and paste - XTerm ) - which is necessary for the Qubes global clipboard.
For this I need to set the X resources (i.e. settings):
xterm*faceName: Monospace
xterm*faceSize: 12
XTerm.vt100.selectToClipboard: true
The well documented way is to create a custom .Xresources file (in the home directory). Then running xrdb -merge .Xresources and switching to a new terminal.
When I load resources that way in a template, they don’t persist in any derived app qube. That’s why I now load them from/etc/X11/Xresources/x11-common, which does persist. I don’t know exactly why (probably by merging the resources file, it gets referenced in some startup script, which then loads the actual resources - that might also explain the need to open a new terminal).
However, I am puzzled by the following behavior:
If I open XTerm in an app qube using the Qubes “Run terminal” function, then the X resources of the underlying template are loaded (as shown by xrdb -query), but only partly do what they are intended to do. The font settings work fine, but when I try to copy the clipboard to the global clipboard, I get a warning that it is empty - which implies the X resource XTerm.vt100.selectToClipboard is not in effect, i.e. the selected text does not land in the clipboard.
All works as expected when using qvm-run (root or user) or the Qubes menu.
It seems I have a major misunderstanding about what it means to “load” a X resource. Is there any difference between what xrdb -queryshows and the actual setting? Might this be an X related bug?