[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: TERM defaults to linux even on serial console (where vt102 would be more appropriate)



Erik Andersen wrote:
> On Mon Feb 14, 2000 at 09:48:24PM +0100, Eric Delaunay wrote:
> > 
> > Hello Erik,
> > 
> >   could you add some glue to busybox' init to set up TERM to vt102 instead of
> > linux when booting on serial console?
> > Dialog boxes could be better drawn with such term settings (using - and |
> > characters).
> > I know I can pass TERM=vt102 at boot time in kernel command line but it would
> > be nice if it could be automagically assigned by init itself.  Sparc bootdisks
> > worked like that in slink, at least.
> 
> I agree that "ANSI" (the current setting) is not best cross-platform setting,

Your ANSI setting is not used at all because the kernel is passing
TERM=linux all the time to the first program it runs (take a look at
kernel-source/init/main.c).
What I'm willing to implement, is a way to set TERM to vt102 when booting on
serial console without requiring the user to pass TERM=xxx in kernel command
line.
In slink I implemented it in the init program, so I would want to do the same
for potato.  But it might be better to implement it in the kernel itself.
To implement it in init, I need to detect serial console (it's easy) then
replace TERM=linux with TERM=vt102.
OTOH, to implement  it in the kernel, at least on sparc, the serial_console
variable should trigger the choice between linux and vt102.  Also easy to
implement in init/main.c for example, but it needs to be accepted upstream
otherwise Debian will use a non standard kernel.
Any advice?

> but it seems like if we going to change it, then we should either change it to
> set TERM=vt100 (which seems to be the least of all possable least common
> denominators and is what the old busybox used to use), or set it to TERM=linux.

>From what I remember from a previous discussion I already had on this topic,
vt102 seems working fine on lot of terminals.  But we can stick with vt100 if
you disagree with me.

> Architectures that want something other than vt100 can hard code the desired
> TERM setting into the kernel command line...

Yes.

> Thoughts?  Sound agreeable?

I can provide you a patch I wrote for init.c to implement my thoughts.

Regards.

-- 
 Eric Delaunay                 | S'il n'y a pas de solution, c'est qu'il n'y
 delaunay@lix.polytechnique.fr | a pas de problème.   Devise Shadok.


Reply to: