Operating System - HP-UX
1832984 Members
2927 Online
110048 Solutions
New Discussion

Why does login prompt for "TERM" only sometimes?

 
Debbie Fleith
Regular Advisor

Why does login prompt for "TERM" only sometimes?

We have many user's sharing the same .profile and all using the same terminal emulation package configured to use ".wy60". We are using the following statement within this .profile:

TERM=`ttytype`;export TERM

Some of the users login without getting prompted for a TERM type, others get prompted to enter it.

Does anyone know why?
8 REPLIES 8
Rick Garland
Honored Contributor

Re: Why does login prompt for "TERM" only sometimes?

The terminal setup features could be a possibility.
The term setup could be set to UNKNOWN and when that is sent to the OS, it receives and UNKNOWN term type.

Does sound like something in the terminal setup.
Debbie Fleith
Regular Advisor

Re: Why does login prompt for "TERM" only sometimes?

All are using the same "wyse60" emulation in the same Tiny Term emulation package. I suppose there might be some other differences though.
Rick Garland
Honored Contributor

Re: Why does login prompt for "TERM" only sometimes?

There are wyse60 configuration options in alot of term emulation packages
James R. Ferguson
Acclaimed Contributor

Re: Why does login prompt for "TERM" only sometimes?

Debbie:

I would guess that something is amiss in the terminal auto-identification sequence.

During login, when /etc/profile executes (before the .profile), the 'ttytype' command attempts to identify the current terminal by sending an identification request to it.

I am assuming that a timing issue or some other state of the physical terminal has prevented the return of any ID, leaving the TERM variable unset. Then, when the $HOME/.profile is read, a 'tset' command is offered with the option to query the user.

All of this happens BEFORE YOU set and export the TERM variable.

...JRF...
Paula J Frazer-Campbell
Honored Contributor

Re: Why does login prompt for "TERM" only sometimes?

Hi
I have found this to happen if users start to enter login/passwd detail before the session is fully established.

Give it a try and see if you can recreate it.

HTH

Paula
If you can spell SysAdmin then you is one - anon
Bill Hassell
Honored Contributor

Re: Why does login prompt for "TERM" only sometimes?

The ttytype program is actually a big guessing game. There are hundreds of terminals (see /usr/lib/terminfo/*.*) and some respond to queries, others do not. ttytype by default tries the 3 major categories by sending escape sequences hoping to trigger a response. If nothing comes back quickly, it tries another sequence.

However, users may clobber a normal response with type-ahead data (like extra CR's or other characters) in which case ttytype doesn't see anything it recognizes and resorts to asking the user for a TERM value.


Bill Hassell, sysadmin
Dan Hetzel
Honored Contributor

Re: Why does login prompt for "TERM" only sometimes?

Hi,

It guess that some of your terminals (or emulators) provide a valid answer to the identification query and some don't.

I know that the wyse 60 has a setup entry for the identification string, a good emulator should have the same. Make sure that all the emulators are configured identically.

Best regards,

Dan
Everybody knows at least one thing worth sharing -- mailto:dan.hetzel@wildcroft.com
Tracey
Trusted Contributor

Re: Why does login prompt for "TERM" only sometimes?

I have seen this problem when the connection between terminal and HP is slow. As one other person says, it doesn't get a response back in a "timely" manner and prompts the user.