Newbie Linux/Mac OS X tip: I finally found a page that explains the Linux backspace/delete terminfo stuff well enough that I was able to fix backspace behavior on my Linux box when I used Mac OS X Terminal. Terminal uses "xterm-color" as its TERM, which, in my Debian 3.0r2 installation, had the undesired (but common) values for kbs (backspace) and kdch1 (delete). I was able to fix it with:
- Log in to the affected Linux box.
echo $TERMto confirm the terminfo setting. (Mac OS X Terminal should be usingxterm-color.)infocmp >xterm-color- Edit
xterm-color, findkbsand make sure it readskbs=\177, and findkdch1and make sure it readskdch1=\E[3~. Save. mkdir -p ~/.terminfo/x- Temporarily set the
TERMINFOenvironment variable to~/.terminfo. In bash/zsh:export TERMINFO=~/.terminfo - Test-compile the new terminfo file:
tic xterm-colorIf successful,~/.terminfo/x/xterm-colorwill be the compiled terminfo file. unset TERMINFO- If desired, back up the original compiled terminfo file. Look for it as
/etc/terminfo/x/xterm-coloror/usr/lib/terminfo/x/xterm-color. - Run
tic xterm-coloragain as root (usingsuorsudo) to compile and install the new version in the official location.
I've got kdch1=\004. I'm preferring the behaviour overall.
Notably I've got the same thing set in Terminal.app's 'keyboard' preferences.
Hope this helps somebody.