Subject: Re: how to change pre-login message?
To: NetBSD-help list <netbsd-help@netbsd.org>
From: Will Roberts <oldbear@arctos.com>
List: netbsd-help
Date: 08/07/2001 14:10:29
At 02:03 PM 8/6/01 -0500, Nigel Reed wrote:
>
>On Mon, Aug 06, 2001 at 09:21:13AM -0400, Will Roberts wrote:
>>
>> 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.
In my particular arrangement, this kind of screen clearing is only
important on the console terminal (a VT-425 connected to the serial
port of the Sparc.)
My problem was that when a user on this terminal logged out, the
login message for the next user would display below the last few
lines of the previous user's session. I wanted to clear the
screen on this terminal for reasons of privacy and aesthetics.
Other users of this machine connect over our LAN using telnet. For
them, this is not an issue because each telnet session is new. (The
system ends each telnet session when the user logs out and it does
not repaint the last lines of the previous user's telnet session
when the next user logs in.)
Hence screen clearing really does not matter for these users because
the pre-login message will be the first thing displayed in their
telnet session. They can specify their own terminal type in their
personal settings which are used once they've logged in.
On a (hopefully) final note, I notice that the default NetBSD
installation on Sparc lists the console terminal type as "sun" in ttys.
This is seems to be true even though I identified my terminal as a
VT100 when prompted at the beginning the install process. (Possibly
the Sparc port of NetBSD defaults to a "sun" console because most Sparc
users will have a Sun monitor connected to a framebuffer.)
I am not sure if changing "sun" to "vt100" in ttys would cause NetBSD
to use the vt100 definitions in termcap -- and therefore clear the
screen using the default pre-login message in gettytab .
Even so, it's good to know how to modify the text of the pre-login
message in gettytab (or in a referenced file, as was suggested by
Hubert Feyrer.) It is helpful to be able to present users with a
more customized message about the machine to which they are about to
attempt login.
Regards,
Will
The Old Bear