adm3a and Linux

Holger Veit holger.veit at iais.fraunhofer.de
Tue Jul 22 09:38:39 CDT 2008


Bert Thomas schrieb:
> John Floren schreef:
>> I pulled out my ADM-3A today in an effort to stave off studying and
>> homework and such; hooked it up to my Debian box, only to find that
>> there isn't really very good support for it under Debian. I use this
>> line in my inittab:
>> T0:23:respawn:/sbin/getty -h -L ttyS0 9600 adm3a
>> and while I can log in, vim for example looks TERRIBLE, ls tries to do
>> color and fails miserably, etc.
>> When I log on to one of the Solaris machines on campus via SSH, they
>> handle things gracefully. ls works right, vi is excellent.
>> Is the difference in our terminfo files, or what? I'm not really sure
>> how these things work so I'm hoping somebody can help me figure out
>> what's up here, because I'd like my Debian computer to play nicely
>> with the terminal.
>
> I'm no expert on this topic, but I think you need to adapt the TERM 
> environment variable. The curses library uses this to determine what 
> control codes to send to your terminal to draw the screen.
Actually, he sets the TERM variable; that's what the 'adm3a' in the 
getty line above is supposed to do.
This will then by exported to the login shell.
I rather think the problem is that contemporary linux versions attempt 
to be clever, in running additional /etc/profile or /etc/login.csh etc. 
files which nowadays no longer have any clue that one might connect 
through a rather dumb terminal. I have seen such profile files that 
simple replace whatever setting there is with its own idea (TERM=linux, 
TERM=ansi) or alike, without any further check. Knowledge about former 
best practices have largely degraded with modern Linux use - who the 
heck will run anything below KDE on 1920x1600 in 4M-color modes anyway? ;-(

The advice is correct: check what TERM, LANG, LC_* etc. will tell you, 
and be sure that it will fall back to 7 bit ASCII modes (not UTF). I 
have also seen some "color ls" which implicitly assumes ANSI colors 
without checking the terminal.

Yet, even with this, it has been an eternal problem that 
termcap/terminfo settings were and are grossly buggy and untested; so 
depending on the terminal settings and the used curses/ncurses version, 
the few codes for an adm3a may no longer be sufficient to display even a 
modest vi correctly, leave alone such great implementations (not!) of 
text windowing software which imply PC line drawing characters >0x80
(it might already be ncurses that is the culprit).

-- 
Holger




More information about the cctech mailing list