vt220 and wrong pgup, pgdn, home and end keys

Dan Nelson dnelson at allantgroup.com
Mon Mar 7 20:45:47 PST 2005


In the last episode (Mar 07), Jeremy C. Reed said:
> My /etc/ttys uses vt220 for one of my consoles. (Because I am logging
> into a host that doesn't know cons25.)
> 
> I see that PgUp sends ESC [ I instead of ESC [ 5 ~
> Also, page down sends ^[[G, home sends ^[[H and end is [[F.
> TERM is vt220 (as set by getty).
> I didn't modify keys with kbdcontrol (or anything else).
> 
> Also some of the screen redrawing is not done correctly when I am in
> pine.  What is the correct way to make a virtual console provide
> vt220 and correct key codes sent?
>
> Does anyone use /etc/ttys to define vt220? How does it work for you?
> (I haev had problems with this for years with various releases.)

It just doesn't work that way.  Writing "cowboy hat" on a bowler
doesn't make it a cowboy hat.  The whole idea of TERM entries is to let
remote systems adapt to your local terminal type.  If you don't have
root access to the remote system to install a cons25 termcap entry, try
creating a ~/.termcap file and putting just the cons25 entry in it.  If
it's a terminfo system, set TERM=cons25, TERMINFO=$HOME/.terminfo/, and
run tic on that cons25 termcap entry to compile it into a terminfo
file.

Another alternative is to run screen (which emulates a vt100 terminal
with some ANSI extensions), then connect to the remote system.  If that
doesn't work, try the comms/wy60 port and set your TERM to wy60 when
you log into the remote system.  In all cases, leave your local TERM
set to cons25.

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-questions mailing list