Operating System - HP-UX
1830624 Members
2037 Online
110015 Solutions
New Discussion

question regarding setting of TERM

 
Mark Harshman_1
Regular Advisor

question regarding setting of TERM

I have a question regarding the setting of the TERM value. I have this set in the /etc/profile, but when a user logs in, it stops to prompt them with this, and gives them an option to change. Is there a way i can force this and avoid the stoppage for the user at login? i am using HPUX 11i. thanks
Never underestimate the power of stupid people in large groups
3 REPLIES 3
Mel Burslan
Honored Contributor

Re: question regarding setting of TERM

in the .profile of the user or in the /etc/profile, you will see a struct like


if [ "$TERM" = "" ]
then
eval ` tset -s -Q -m ':?hp' `
else
eval ` tset -s -Q `
fi


in your case the term value comes in as unspecified and fits to the statement under "then" clause

you either comment out

eval ` tset -s -Q -m ':?hp' `

line in the user's profile and/or /etc/profile, or make them use a terminal emulator which presents itself as a known terminal type, i.e., xterm, vt100, hp or whatever else that may be.
________________________________
UNIX because I majored in cryptology...
Cesare Salvioni
Trusted Contributor

Re: question regarding setting of TERM

It depends what u have in /etc/profile and what u wanna do.
First of all, the command prompting the user should be ttytype which tries to get the correct terminal for the user.
If this is the command asking u have two choises:
if all ur users r using the same kind of term, just comment out the line whith ttytype and replace with something like:
TERM=vt100; export TERM
ERASE='^H'; export ERASE

ttytype stops and asks the user if it cannot find the terminal type, using option -a ttytype goes on and set a TERM=unknown this could be a problem for some commands, if it's not for u leave the command and add the option -a

Hope this helps
Cesare Salvioni
Bill Hassell
Honored Contributor

Re: question regarding setting of TERM

You do NOT want to set TERM in /etc/profile or any other .profile. The reason is that there may be many different terminals (or emulators) used to connect to your system (the console, a modem, a PC, another HP-UX box, etc). The prompt being issued to user as they login is due to a truly dumb terminal. The default /etc/profile will ask the terminal to identify itself and if it is too stupid to answer, it ttytype will prmpt the user to answer instead. If this is the case, you might look at scrapping whatever terminal (or emulator) you are using and getting a real terminal.


Bill Hassell, sysadmin