Solved Understanding Xresources and xterm behaviour disconnect

Hi all,

Continuing on my journey of explorer life outside of a DE, I'm having some issues understanding how to correctly configure x11/xterm.

I have my ~/.Xresources file which I load via ~/.xsesson using xrdb -load .Xresources
~/.Xresources looks like this:
Code:
xterm*loginShell: true
xterm*saveLines: 100000
xterm*background: black
xterm*foreground: green

XTerm*selectToClipboard: true

! For triple-click, select from current word, to end of line
XTerm.vt100.cutNewLine: false
XTerm.vt100.cutToBeginningOfLine: false
XTerm.vt100.charClass: 33:48,35:48,37:48,38:48,42:48,42-47:48,63:48,64:48,126:48,172:48
! Use character classes be part of selection.
! 48 ==standard alphanumeric selection
! 33:48 == make 33 act like 48
! 33 = !
! 35 = #
! 37 = %
! 38 = &
! 42-47 = * + , - . /
! 63 = ?
! 64 = @
! 126 = ~
! 172 = _

XTerm*termName:                         xterm-256color
XTerm*activeIcon:                       false
XTerm*visualBell:                       true
! disable alt+enter, use F11 to toggle fullscreen
! and use ctrl+shift+c/ctrl+shift+v to copy/paste
XTerm*VT100*translations:    #override \
        Alt <Key>Return: ignore() \n\
        <Key>F11: fullscreen(toggle) \n\
        Ctrl Shift <Key>C: copy-selection(CLIPBOARD) \n\
        Ctrl Shift <Key>V: insert-selection(CLIPBOARD)

I'm confused because whereas these lines work (I can see their effect):
Code:
xterm*loginShell: true
xterm*saveLines: 100000
xterm*background: black
xterm*foreground: green

The "XTerm.vt100" lines don't seem to take effect at all...
Is this because my $TERM is xterm-256color? If I start xterm in vt100 mode then they seem to work...
I also don't understand if capitalisation is important, and if it is when it is important...
Looking in my ~/.cwmrc file, I launch uxterm by default
 
SirDice, cool. So, in terms of features/evolution my understanding is that vt100 < vt220 < xterm. My presumption was that either there would be some inheritance of settings, or the man page may have listed settings for more than just VT100 and Tek4014, seeing as (from my understanding) xterm emulates a vt220 with additional features.

I don't have issues copying/pasting to and from xterm - will post my .Xresources when I get off work. I also use uxterm.
Much appreciated :)
 
Here's mine, forgot it was on my NAS. I just noticed the vt100 references - odd because those work. Maybe because I said "xterm-256color"?

Code:
Xft.dpi: 96
Xft.antialias: true
Xft.hinting: true
Xft.rgba: rgb
Xft.autohint: false
Xft.hintstyle: hintslight
Xft.lcdfilter: lcddefault

UXTerm.termName: xterm-256color
UXTerm.vt100.metaSendsEscape: true
UXTerm.vt100.saveLines: 4096
UXTerm.vt100.foreground: green
UXTerm.vt100.background: black
UXTerm.vt100.faceName: Liberation Mono:size=12:antialias=true:weight=regular
 
Thanks Sevendogsbsd.

I don't have issues copying/pasting to and from xterm

To be clear (as I think I may not have been), selecting text in xterm copies it to my PRIMARY buffer, and I can use middle-click to paste into other xterms/firefox/etc, but because I use FreeBSD inside VirtualBox at work I use the bidirectional copy/paste feature of VBoxClient, this only seems to effect the CLIPBOARD buffer, and not PRIMARY. This means that I cannot select text in xterm and easily paste it back out of VirtualBox into a Windows application. Nor can I select text in xterm and paste it into (for example) Firefox using ctrl-c or left-click>paste
Does your selection in xterm get put into the PRIMARY of CLIPBOARD buffer?

It's an odd setup, I know, but I feel infinitely more comfortable in FreeBSD than in Windows, and I'm not allowed to wipe the Windows laptop but am allowed to run VMs on it...

I'll take another look at this when I get home :)
 
For the input translations, I use the following:
Code:
*VT100.Translations:    #override \
        !<KeyPress>Insert:      dabbrev-expand() \n\
        !<KeyPress>Home:        string("\033[g") \n\
        ... and so on
Note that it does not start with XTerm, so it is always used, no matter what terminal incarnation is used (they are all VT100 compatible).

Concerning copy&paste, I recommend installing the autocutsel package (deskutils/autocutsel). It automatically synchronizes the clipboard buffers.
 
I understand and that makes sense. I ONLY use FreeBSD on bare metal so my PRIMARY
buffer works fine. Thanks for clarifying!

Thank you, you helped me embark on this 😊

For the input translations, I use the following:
Code:
*VT100.Translations:    #override \
        !<KeyPress>Insert:      dabbrev-expand() \n\
        !<KeyPress>Home:        string("\033[g") \n\
        ... and so on
Note that it does not start with XTerm, so it is always used, no matter what terminal incarnation is used (they are all VT100 compatible).

Concerning copy&paste, I recommend installing the autocutsel package (deskutils/autocutsel). It automatically synchronizes the clipboard buffers.

Awesome! That (the *VT100 deskutils/autocutsel) and seems to have solved the issue! Thank you so much!
 
Back
Top