vt220 and wrong pgup, pgdn, home and end keys

Giorgos Keramidas keramida at ceid.upatras.gr
Tue Mar 8 03:46:47 PST 2005


On 2005-03-07 19:31, "Jeremy C. Reed" <reed at reedmedia.net> wrote:
> Please cc me on replies.
>
> My /etc/ttys uses vt220 for one of my consoles. (Because I am logging
> into a host that doesn't know cons25.)

That's not a good idea.  Your console is not a vt220 terminal, so some
keys will act in funny ways.

I usually run screen to do what you're trying to accomplish.

Setting TERM=vt220 inside screen is not a problem.  In fact, it's the
best way I've found so far for SSH'ing into arbitrary remote hosts
(which may not have 'cons25' in their termcap or terminfo).

Both my .screenrc and .bashrc know about this and set TERM=vt220 inside
screen windows:

( .screenrc )

	term vt220

( .bashrc )

	# Terminal hacks for screen(1).
	case $TERM in
	screen*|vt220*)
	        stty status '^T'
	        export TERM='vt220'
	        unset TERMCAP
	        unset DISPLAY
	        ;;
	esac



More information about the freebsd-questions mailing list