Subject: Re: termcap question
To: Julian Coleman <J.D.Coleman@newcastle.ac.uk>
From: Daniel R. Killoran,Ph.D. <drk@shore.net>
List: netbsd-help
Date: 09/07/1999 10:03:50
Julian Coleman wrote:

>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.

Yes, this is EXACTLY what I want to do (plus adding an appropriate .emacs file)

> 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.

Aha! I didn't recognize the "co" and "li" as cols and rows!

> If you modify the termcap database, you will also need
>to rebuild the dbm file with `cap_mkdb termcap`.

Thanks, I didn't know that!

> Also, keep the changes
>somewhere else, as the files will be overwritten by an upgrade or a build from
>source.
>

I suppose that .termcap in my own directory would evade that problem?

>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
>

...and the thing that I found mystifying was that, although pc and vt100
are in /usr/share/misc/termcap, tty33 is NOT! So I wondered if I was
hitting all the bases (as you tell me I was!) and if not whether there was
some other mysterious place that had to be modified.
I will go and tinker now in peace.

Thanks guys!

Dan Killoran