Serial console terminal type

Serial console terminal type

Post by Skylar Thomps » Tue, 04 Dec 2001 01:59:45



I have a Wyse 30 serial terminal acting as a console hooked up to the RH
7.1 PC. It works fine, but I have to manually change the terminal type to
wy30 from linux. In NetBSD, this could be done from /etc/inittab and, in
fact, I have that in inittab:

s0:12345:respawn:/sbin/getty ttyS2 DT38400 wy30

In BSD, the wy30 would set the terminal type to wy30 for anything coming
over that serial line, and the man page for getty says it should, too. Yet
the terminal type remains at linux when I log in. Is there something else
I have to, or a work-around I could employ?

--

 
 
 

Serial console terminal type

Post by David Efflan » Tue, 04 Dec 2001 08:07:25



> I have a Wyse 30 serial terminal acting as a console hooked up to the RH
> 7.1 PC. It works fine, but I have to manually change the terminal type to
> wy30 from linux. In NetBSD, this could be done from /etc/inittab and, in
> fact, I have that in inittab:

> s0:12345:respawn:/sbin/getty ttyS2 DT38400 wy30

Why do you call ttyS2 s0.  Not that it really matters, but might it not
make more sense to call it S2 (to match the serial port).

Quote:> In BSD, the wy30 would set the terminal type to wy30 for anything coming
> over that serial line, and the man page for getty says it should, too. Yet
> the terminal type remains at linux when I log in. Is there something else
> I have to, or a work-around I could employ?

Does getty use terminfo, or still /etc/termcap per the man pages?  When I
connect to a serial port with minicom, it shows my TERM as vt100, but the
system does not know my terminal geometry, so certain programs (like
editors) complained until I set that in ~/.bash_profile.

if [ "`stty size`" = "0 0" ]; then
        stty rows 24 cols 80
fi

You could likewise check or set your TERM or both in one shot.  For
example:

if [ "`tty`" = "/dev/ttyS2" ]; then
        stty rows 24 cols 80
        export TERM=wy30
fi

--
David Efflandt - All spam is ignored - http://www.de-srv.com/
http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://cgi-help.virtualave.net/  http://hammer.prohosting.com/~cgi-wiz/

 
 
 

Serial console terminal type

Post by Skylar Thompso » Wed, 05 Dec 2001 10:33:02




>> I have a Wyse 30 serial terminal acting as a console hooked up to the RH
>> 7.1 PC. It works fine, but I have to manually change the terminal type to
>> wy30 from linux. In NetBSD, this could be done from /etc/inittab and, in
>> fact, I have that in inittab:

>> s0:12345:respawn:/sbin/getty ttyS2 DT38400 wy30

> Why do you call ttyS2 s0.  Not that it really matters, but might it not
> make more sense to call it S2 (to match the serial port).

I decided to do it that way since it is the first terminal I have attached
to my system, and also since I was too tired to do anything but follow the
HOWTO at the time. :)

Quote:>> In BSD, the wy30 would set the terminal type to wy30 for anything coming
>> over that serial line, and the man page for getty says it should, too. Yet
>> the terminal type remains at linux when I log in. Is there something else
>> I have to, or a work-around I could employ?

> Does getty use terminfo, or still /etc/termcap per the man pages?  When I
> connect to a serial port with minicom, it shows my TERM as vt100, but the
> system does not know my terminal geometry, so certain programs (like
> editors) complained until I set that in ~/.bash_profile.

I believe it still uses termcap. At least, that is what my compilation
uses, and that is what BSD has it use.

Quote:> if [ "`stty size`" = "0 0" ]; then
>         stty rows 24 cols 80
> fi

> You could likewise check or set your TERM or both in one shot.  For
> example:

> if [ "`tty`" = "/dev/ttyS2" ]; then
>         stty rows 24 cols 80
>         export TERM=wy30
> fi

Works perfectly. I was so fixated on getting everything to happen from
within inittab that I didn't think of anything like that. Thanks!

--

 
 
 

1. No boot with serial port console and console terminal off

Folks;

I suspect this is the way that things are supposed to be, but I figure
that I'll ask, anyway.  Warning-- ramble ahead.


connection.  Since I'm short of desk space, I compiled the kernel with
the COMCONSOLE option set, and set tty com0 in /etc/boot.conf.  This
way, I can see what's happening on boot (when I need to), and yet don't
need to have an extra monitor and keyboard on my desk.

The power finally went the other day, and of course, the box that I use
for OpenBSD doesn't automatically turn on when the power is restored.
My wife called me at the office, and I had her toggle the power on the
firewall box.  Unfortunately, it didn't boot, much to my wife's
distress.

When I got home, I turned on the machine that has the other end of the
console serial cable, fired up kermit, opened the com0, and low and
behold, the loader continued to boot the OpenBSD machine.  It doesn't
boot unless the console is active, and setting the DTE (DCE?) line on
the serial port.  I had never noticed this before, since the only time
I've rebooted the machine was after recompiling the kernel, and (of
course) I had the console terminal up at the time to make sure that the
boot messages actually went where I wanted them to.

I have a sinking feeling that it is supposed to be this way-- no
conaole, no boot.  [I have visions in my head of line-printer terminals
logging all the console messages to hardcopy, with paper scrolling onto
the floor...]  However, I'm hoping that one of you gurus can tell me
about some obscure option that I can set that will let the machine boot
with COMCONSOLE and the boot tty as com0 _without_ requiring the console
to actually be powered up.

Else, I'm going to have to short some wires on the serial cable when I
jumper the power switch to have the machine power up after a power
failure.

                                TIA,
                                Henry

2. Onboard 3c920 on a ASUS CUSL2 / Intel 82559 on a ASUS CUV4X

3. console vs. vt100 terminal type setting

4. Siemens I-Talk (ISDN)

5. Console terminal type

6. Compiling 2.3.99pre5 problems for Yikes! G4/400

7. 'console' unknown terminal type.

8. ssh compile problems-Red Hat Linux

9. Solaris console window terminal type

10. What terminal type is console ???

11. Console Terminal Type

12. console terminal type & /etc/ttys

13. how to change terminal type for console