Matthew Seaman m.seaman at infracaninophile.co.uk
Thu Jun 10 22:49:23 BST 2004

Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Jun 10, 2004 at 09:26:57PM +0100, David Jenkins wrote:

> When I SSH from the FreeBSD machine to my Linux box (It's a=20
> Sparcstation, otherwise it would have  FreeBSD too ;)) and then say try=
> editing a file with vi I get this error:
> vi: cons25: unknown terminal type.
> ... and vi won't start. At the remote prompt I then (using BASH)=20

Yes -- the terminal type 'cons25' is not recognised in the SysV world.
Which is a bit odd as cons25 is based on the standard console driver
found in SCO machines, and those are SysV to the core.

It's been a while since I looked at this, but I believe that SSH'ing
into Solaris machines you can use a terminal type of AT386
successfully -- but my memory is failing, and that type may not be
present in the Linux terminfo.

Another one to try would be 'ansi', except you'll usually need a 25x30 scre=
size, which isn't usual except as the FreeBSD console.

Failing that, you can extract the cons25 and related entries from
/etc/termcap and use the captoinfo(1) command on your Linux box to
generate a terminfo database entry for the cons25 terminal type.  See

> export TERM=3Dvt100 or xterm (I've tried both)

All of the assumes you're using the FreeBSD console rather than
working from within X.  If you were ssh'ing to your Linux box from
within an xterm window on your FreeBSD desktop, then TERM=3Dxterm would
be the correct setting.
> This allows me to open the file with vi but I cannot use the cursor keys=
> (they print multiple characters to the screen).
> I have tried chaging cons25 in /etc/ttys to xterm or vt100 prior to=20
> SSHing but I still get the same problem.

That won't work unless you also recompile your kernel to expect the
console terminal to be a vt100 type -- see pcvt(4) and the commented
out section on the PCVT console driver in
/usr/src/sys/i386/conf/GENERIC -- however, I'd stick with the default
syscons(4) console.
> Interestingly (and perhaps relevant !?), the problem does not exist when=
> using the Windows SSH client PuTTY.

All Windows terminal emulation software tends to emulate a vt100 style
terminal by default.  Which is a terminal type that just about every
device or operating system you can access by ssh will be able to use.
The days of all sorts of weird and wonderful character based terminals
are long gone -- other than vt100/xterm, there's sometimes an option
somewhere to emulate an ANSI terminal, but that's not something I've
ever needed to use.



Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.2.4 (FreeBSD)



More information about the Ukfreebsd mailing list