Backspace sends sequence for Delete Key in xterm
The problem started with xterm-192-1.EL4.0. CentOS 4.4 includes version 192-4.EL4, while CentOS 4.3 includes 192-1 (before the change).
when the following lines (along others) were added to the XTerm resource files, located at: /usr/X11R6/lib/X11/app-defaults/XTerm
Other relevant resource files might include UXTerm and XTerm-color, on the same directory.
The lines (2):
! keyboard setup *VT100*backarrowKey: false
This particular resource will cause all VT terminals to disable the backarrowKey feature, which means BS will no longer send ^H, but will send DEL instead (^?).
To test this behaviour, open an xterm, and use Control-LeftButton to open one of the configuration windows (hold the left button of your mouse down), selecting the "Backarrow Key (BS/DEL)" option. When enabled, you get ^H. When disabled, you get ^?.
The least intrusive way to fix this is to create a .Xresources file on the user home directory (~/.Xresources), adding the following like:
After that, you can either restart X (Control-Alt-Backspace is great for it, also "telinit 3; telinit 5" as root), or you can just merge this new value:
xrdb -merge ~/.Xresources
You can, of course, edit the XTerm resource file directly, or /etc/X11/Xresources, but that might (will?) lead to problems on future updates.
The great advantage of this method is not losing it on a future update.
In any case, you will have to close your terminal windows and reopen them for the change to take effect.