I'd like to get Terminfo for my terminal (rxvt-unicode) working, so that when I ssh from Linux to macOS, the Home/End and other keys work properly.
Usually, to accomplish this with a Linux remote host, I use a script like the following:
ssh "$1" 'mkdir -p ~/.terminfo/r'
for f in /usr/share/terminfo/r/rxvt-unicode{,-256color}
do
scp "$f" "$1":.terminfo/r/
done
However, this isn't working with macOS.
When I run screen
, first I was getting "TERM too long - sorry.".
After updating it to the brew version (4.06.02), I'm now getting "Cannot find terminfo entry for 'rxvt-unicode-256color'."
TERM
is correctly set to rxvt-unicode-256color
, and ~/.terminfo/r/rxvt-unicode-256color
exists.
Running screen
with TERMINFO=$HOME/.terminfo/
also has no effect.
TERM
is an ugly hack that is likely to cause problems elsewhere - the correct thing to do is to tell the remote applications how to talk to your terminal using a termcap or terminfo file.