Subject: Re: termcap question
To: Daniel R. Killoran,Ph.D. <drk@shore.net>
From: Julian Coleman <J.D.Coleman@newcastle.ac.uk>
List: netbsd-help
Date: 09/07/1999 12:31:33
Daniel R. Killoran,Ph.D. wrote:
> Sure. I want to create a terminal device, called zterm, similar to vt100,
> but with 37 lines & 96 cols. I also want to change a couple of other things.
> This is the most convenient size to use with Zterm on a Mac as a serial
> terminal. I know I can change the rows & cols with stty, but I would like a
> specific device type.

David Brownlee wrote:
>        /etc/ttys?

Michael G. Schabert wrote:
> Try /usr/share/misc/termcap

Simon Burge wrote:
> Or if it's just for a single user you can have a .termcap in your home
> directory - that way it wont get scribbled on if you type "make build"
> or whatever...

I think I've got this correct.  You want to slightly modify the vt100 settings
when you (from the serial port) from your Mac using Zterm.  The termcap
database is in the file /usr/share/misc/termcap (`man 5 termcap` for the
descriptions of the capabilities).  You can either modify the file yourself
and add a zterm entry or, you can put the entry in the file .termcap in your
home directory.  Something like :

zterm|Mac Zterm:\
	co#96:li37:tc=vt100-am:

would change the columns and lines settings but leave all the others the same
as the vt100-am entry.  If you modify the termcap database, you will also need
to rebuild the dbm file with `cap_mkdb termcap`.  Also, keep the changes
somewhere else, as the files will be overwritten by an upgrade or a build from
source.

To get termcap using programs to use the correct terminal type, you need to
make sure that the TERM environment variable is set to zterm.  As the Mac is
connected on a serial line, you need to change the relevant line in /etc/ttys.
For example, if the Mac was connected to ttyb, you would have :

ttyb    "/usr/libexec/getty std.9600"   zterm on secure

(see `man ttys` for the descriptions of the flags).

J

-- 
                         Of course it runs NetBSD
                          http://www.netbsd.org/