setting TERM (arguments to login(1))
Guy Harris
guy at sun.uucp
Wed Sep 18 14:18:21 AEST 1985
> ...Thus, you can get things such as:
> login: psc hp
> which (depending on how you write your .profile), either sets TERM,
> overides a default setting of TERM to a terminal you use all the time,
> or precludes .profile for prompting for and reading a terminal name.
Unfortunately, if your login shell isn't a conventional command interpreter
(i.e., you get thrown directly into some application), you lose, since you
don't *have* a .profile.
And if your "getty" program isn't really "getty", but some screen-oriented
program, you lose even bigger.
> Neither getty(1M) online (SVR2 on a Vax) nor gettydefs(4) from the same
> manual as quoted above make any mention of this feature. Maybe they
> mean that in /etc/inittab, you can have TERM=foo at the beginning of the
> process string? (But "sh -c 'exec FOO=bar ...'" doesn't seem to work
> well.)
No, but (assuming you've fixed "login" to propagate whatever the setting of
TERM was when it was entered),
"env TERM=foo getty..."
(or "env TERM=foo my_office_automation_systems_login_frame" or whatever)
will work just fine. (Thanks and a tip of the hat to Eric Finger for this
one.)
Guy Harris
More information about the Comp.unix
mailing list