Subject: Re: how to change pre-login message?
To: Will Roberts <oldbear@arctos.com>
From: Nigel Reed <nigel@nelgin.nu>
List: netbsd-help
Date: 08/06/2001 14:03:03
On Mon, Aug 06, 2001 at 09:21:13AM -0400, Will Roberts wrote:
> At 10:09 AM 8/6/01 +0100, you wrote:
> 
> >Will Roberts <oldbear@arctos.com> wrote:
> >
> >> I was able to edit the /etc/gettytab file to add the screen clearing 
> >> and cursor positioning escape sequences without any problem:
> >> 
> >> default:\
> >>     :ce:ck:np:im=\033[2J\033[H\r\n%s/%m (%h) (%t)\r\n\r\n:sp#9600:
> >                   ^^^^^^^^^^^^^
> >
> >Wrong - for this you should be using `cl' or `cs'. The latter addresses the
> >problem you describe here:
> >
> >> This clearly is the 'quick-and-dirty' approach because it incorporates 
> >> the VT-100 esc codes in the im= field rather than referencing them 
> >> elsewhere.
> 
> Andrew
> 
> Yes. That was my point. This worked as a quick fix but it should be 
> done by referencing the cl entry in the database:
> 
>      cl   str   NULL   screen clear sequence
> 
> I believe that would be the proper way to allow for different terminal 
> types, no?
> 
> If NetBSD is set up with VT100 as the default terminal type, for the 
> console (in ttys?) then cl would be defined by the definition of cl for 
> the VT100 in termcap?

This may work for some, but what about when you don't know what sort
of terminal is going to be used? ie, for a dialin, it's possible someone
will be set to a Wyse, Televideo or some other exotic emulation which
doesn't recognise the VT100 escape codes. The system isn't going to know
what sort of terminal you're using until after you login.

I favour the method of sending a string of cr/nl characters to clear the
screen when the connecting terminal is of an unknown emulation.

Regards
Nigel

--