Operating System - HP-UX
1832953 Members
2981 Online
110048 Solutions
New Discussion

Re: Setup TERM for console?

 
yaplej
Advisor

Setup TERM for console?

Hey all.

I am setting up a system with a vt100 console, but when I login through that console the TERM = 2392, and this causes the characters to be all weird on my screen. I can manually type "export TERM=vt100", and this fixes the problem.

How can I fix this so my console port uses vt100 mode, and initializes it as such?

I tried /etc/profile, and updated the block


if [ -z "$TERM" ]
case $TERM in
*2392* ) TERM = "vt100" ;;
50) TERM=wy50 ;;
50+) TERM=wy50 ;;
*) eval 'tset -s -Q '#look in ttytype
if [ -z "$TERM" -o "$TERM" = "unknown" ]
then
eval 'tset -s -Q -m ':?wy50' '
fi
;;
esac
fi


I was trying to get the console 2392 to use vt100 for TERM, but I noticed that later the *) statement overwrites my line. Where should I fix this?

Thanks.
4 REPLIES 4
yaplej
Advisor

Re: Setup TERM for console?

Also here is the terminal section of .profile for the users logging into the console. I am sure that this is the script that is actually setting the TERM because when I login to the console it says "Value of TERM has been set to..." So

if [ "$TERM" = "" ]
then
eval ` tset -s -Q -m ':?hp' `
else
eval ` tset -s -Q `
fi
stty erase "^H" kill "^U" intr "^C" eof "^D"
stty hupcl ixon ixoff
tabs

echo
echo "Value of TERM has been set to \"$TERM\". "
export TERM
Bill Hassell
Honored Contributor

Re: Setup TERM for console?

Are you logging in through the real system console (ie, GSP or MP)? If true, then (for reasons that are beyond explanation) the management processor has likely been hard coded to an HP terminal. You'll need to access the processor to change the special emulation code.

If this is a normal telnet or ssh connection, then your /etc/profile needs major repair. HP-UX handles dozens of terminal types and should never rely on what is encapsulated by the remote side nor use a hardcoded value. All that testing code should be replaced with this one line:

eval $(ttytype -s)

To see what this command does, just run: ttytype -s

The command performs a terminal identification sequence to avoid the endless problems with hardcoding TERM=something.


Bill Hassell, sysadmin
yaplej
Advisor

Re: Setup TERM for console?

I am logging in through the real system console (GSP). The GSP is coded as VT100. The system had a normal HPTERM that worked fine, but we are switching to a VT100 terminal.

Login into telnet/ssh works fine.
Bill Hassell
Honored Contributor

Re: Setup TERM for console?

You may need to update the GSP firmware. What model HP-UX server do you have? What does:

ttytype -s

show?


Bill Hassell, sysadmin