Subject: Re: "@" erases line, "#" erases previous character, serial console
To: Christos Zoulas <christos@astron.com>
From: Johnny Billquist <bqt@update.uu.se>
List: netbsd-help
Date: 04/27/2006 19:08:23
I don't get it.
What is the problem.
The fact that he have '#' and '@' by default when loggin in on a serial 
console?

First of all, is wscons really used if you have a serial console? I 
thought not.
Anyway, it hardly matters. wscons is not involved here.

The tty have different characters used for special purposes, such as 
erase, kill and so on.
If the defaults are not what he wants, then it's just a question of 
changing that.
stty is the program normally used.

If he thinks it is a problem that erase is bound to '#' only after 
loggin in, and not while running the login program, well, then he should 
either figure out when these characters are set, and make sure they are 
set before login is running. If he thinks that it's just a question of 
that he shouldn't have erase bound to '#' after loggin in, then he 
should just figure out where in the login processing that this is bound, 
and change it there.

There are no real "bugs" here, as far as I can tell. Historically, Unix 
used '#' for erase, and '@' for kill. And he have managed to find a way 
for this historical fact to also be the actual characters used.
It's somewhere in some configuration file. He'll just have to search to 
find where it's set.

Getting back to wscons, can someone confirm wether wscons is used or not 
on a serial console? (Once again, I thought it wasn't...)

	Johnny


Christos Zoulas wrote:
> In article <20060426205809.GA17727@yuba.kcn.ne.jp>,
> Henry Nelson  <netb@yuba.kcn.ne.jp> wrote:
> 
>>On Wed, Apr 26, 2006 at 05:30:47PM +0000, Christos Zoulas wrote:
>>
>>>In article <20060426005654.GA11613@yuba.kcn.ne.jp>,
>>>Henry Nelson  <netb@yuba.kcn.ne.jp> wrote:
>>>
>>>>On Tue, Apr 25, 2006 at 09:19:59PM +0000, Christos Zoulas wrote:
>>>>
>>>>>In article <20060425205316.GA11023@yuba.kcn.ne.jp>,
>>>>>Henry Nelson  <netb@yuba.kcn.ne.jp> wrote:
>>>>>
>>>>>>I *thought* I had a serial console working fine on i386, but at the
>>>>>>login prompt, "@" acts like ^u and "#" acts like Backspace.  Once
>>>>>>logged in, the keyboard acts normally -- it's only at the login
>>
>>[...]
>>
>>>Can you login to another window and type:
>>>
>>>stty -af /dev/console or the serial tty?
>>
>>Logged in via ssh:
>># stty -af /dev/console
>>speed 38400 baud; 0 rows; 0 columns;
>>lflags: -icanon -isig -iexten -echo -echoe -echok -echoke -echonl
>>       -echoctl -echoprt -altwerase -noflsh -tostop -flusho -pendin
>>       -nokerninfo -extproc
>>iflags: -istrip -icrnl -inlcr -igncr -ixon -ixoff -ixany -imaxbel -ignbrk
>>       -brkint -inpck -ignpar -parmrk
>>oflags: -opost onlcr -ocrnl oxtabs onocr onlret
>>cflags: cread cs8 -parenb -parodd -hupcl clocal -cstopb -crtscts -mdmbuf
>>       -cdtrcts
>>cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
>>       eol2 = <undef>; erase = ^?; intr = ^C; kill = ^U; lnext = ^V;
>>       min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T;
>>       stop = ^S; susp = ^Z; time = 0; werase = ^W;
>>
>>I just now rebooted, and I notice in the messages on the serial console:
>>Building databases...
>>wsconscfg: screen 1 is alrewsdisplay0:screen 2 added (80x25, vt100 emulation)
>>
>>dmesg output has these lines:
>>wsdisplay0 at vga0 kbdmux 1
>>wsmux1: connecting to wsdisplay0
>>wsdisplay0: screen 0-1 added (80x25, vt100 emulation)
>>[... 74 lines snipped, and on last line:]
>>wsdisplay0: screen 2 added (80x25, vt100 emulation)
>>
>>Hmm, maybe I have messed up wscons in the kernel or configuration?
> 
> 
> It looks fine on the server side. Maybe it is the client program that you
> are using to connect to the serial console that causes this?
> 
> christos
> 

-- 
Johnny Billquist                  || "I'm on a bus
                                   ||  on a psychedelic trip
email: bqt@update.uu.se           ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol