[XCSSA] More Sun serial port hijinx.
John D. Baker
jdbaker@blkbox.com
Thu, 3 Jan 2002 16:09:18 -0600 (CST)
> Message: 5
> Date: Wed, 02 Jan 2002 20:30:05 -0600
> From: tweeks <tweeks_at!theweeks.0rg>
> To: xcssa@xcssa.org
> Subject: Re: [XCSSA] UPDATED! Sparc serial help needed
> Reply-To: xcssa@xcssa.org
>
> firestorm_v1 wrote:
> >
> > is there a way to clean up the display's output?
> > the information is veryt helpful! the Sparc does use the serial
> > port on the box when a monitor and a keyboard are not
> > present, , however I keep getting
> >
> > "unknown" I need something more specific..
> >
> > Is there a way to set the terminal emulation like VT100 or so
> > that my arrow keys will work, in vi, etc??
>
> I know just enough to be dangerous... I think that it defaults to
> TERM=sun. You need to do a:
>
> # setenv TERM xterm
> # export TERM
>
> and then try it...
>
> Ask John Baker for verification though. He's the resident Sun guru..
> :) I haven't played with production Solaris since 2.51.
Aw, shucks!
I probably didn't make it clear before but yes, the SPARCstation will
put its console on the serial port if there is no keyboard plugged in,
_even if_ the "output-device" and "input-device" are set to "screen"
and "keyboard", respectively.
(BTW, the SPARCstation LX has the framebuffer built in, so it always
has video capability--thus the presence/absense of a keyboard
ultimately determines where the console will be--unless overridden by
the NVRAM settings.
If you didn't know before, to drop into the OpenBoot monitor with a
serial console, send a BREAK. Most hardware terminals have a BREAK key
of some kind and most terminal emulators have some mechanism to do the
same.
Are you using a real RS-232 terminal, or a terminal program like minicom
or seyon through the serial port of a PeeCee, or whatnot?
I expect Tom's suggestion to ultimately be appropriate, but I first
need to ask for more context. I.e., what do you mean by "keep getting
'unknown'"? Could you be more specific? What is the exact message you
see?
On Solaris 8, NetBSD, and OpenBSD, the terminal type defaults to 'sun'
even if the console is on the serial port. (I think in one case, the
terminal type defaulted to "dumb", but I don't remember what that was.
[NetBSD comes to mind at the moment.])
In these cases, you can change the default by editing "/etc/ttys" and
look for the "console" entry.
For linux, you'll probably have to specify the default terminal type
in the getty command found in /etc/inittab.
I just looked again and Tom seems to be mixing his shell syntax.
setenv TERM xterm
is C shell and is the equivalent of Korn shell/bash's
export TERM=xterm
which is just shorthand for the Bourne shell's
TERM=xterm ; export TERM
Some systems, most notably OpenBSD manage the terminal type by keeping
the entire termcap entry for the terminal in the TERMCAP environment
variable. In this case, setting the terminal environment variables
is usually done with the 'tset' command:
tset -s vt220
Other than system default, setting the terminal type is done in one's
.profile/.bash_profile or .login. If 'tset' is used in one of these
startup files, it must be used as "eval `tset -s [other options] <term>`".
You may also need to adjust parameters maintained by the terminal
driver, which may or may not override characteristics found in the
terminfo/ termcap entry for your terminal. Most notably 'rows' and
sometimes 'columns'.
For this, you would use 'stty'. For example, if you are using a VT220
terminal, but the console defaults to 'sun', it may be expecting a
terminal with 34 rows instead of 24 (both have 80 columns). You would
then need to give the following command:
stty rows 24
in addition to setting your terminal type.
This is probably more than anyone bargained for...
--
John D. Baker jdbaker(at)blkbox(dot)com
http(colon slash slash)www(dot)blkbox(dot)com(slash tilde)jdbaker(slash)
NetBSD OpenBSD Darwin/MacOS X FreeBSD BSD/OS
BSD -- The Operating System for the Third Millenium and Beyond!