Operating System - HP-UX
1824000 Members
3918 Online
109667 Solutions
New Discussion юеВ

TERM is set to VT100 instead of HP

 
SOLVED
Go to solution
Aravind_3
Frequent Advisor

TERM is set to VT100 instead of HP

When a root user is logging on the server, HP console TERM is set to VT100 instead
of HP.

.profile execute a tset -s -Q command and pick up value of TERM which is set to VT100 before that.
- I was unable to identify where is set up the VT100
- I have tried to modify /etc/ttytype to hp or 70096 for the console but it doesn't fix the problem.
33 REPLIES 33
Helen French
Honored Contributor

Re: TERM is set to VT100 instead of HP

Hi Arvind:

You can set the TERM value either in /etc/profile or in $HOME/.profile file.

If you want to set it to hp, then add this in any of those files:

TERM=hp
export TERM

HTH,
Shiju
Life is a promise, fulfill it!

Re: TERM is set to VT100 instead of HP

Is the server a N/L/A Class or newer?

vt100 is the correct setting for the console on these newer systems

You can change it back to 70096 if you want to, but can expect some issues in some situations (e.g. ignite cold install/recovery screens)

To change the settings you need to change the configuration of the console itself, this is accomplished via the function keys at the top od the console itself. I don't have one in front of me right now, so I'll leave it to someone else to give you the exact key strokes...

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Aravind_3
Frequent Advisor

Re: TERM is set to VT100 instead of HP


It is happening on a N-Class machine

- Modifying the "/.profile" is not a solution, since the terminal type is set and used before.

- The workaround to adapt TERM and the console terminal can make the issue more worse since during the next reboot the machine will display a mixup of characters and some programs will not get requested instructions. (the console "hangs")
MANOJ SRIVASTAVA
Honored Contributor

Re: TERM is set to VT100 instead of HP

Hi Aravind

The only other place left to see is /etc/profile , or you can just add

export TERM=hp aat the end of the .profile for the root.



Manoj Srivastava
David Burgess
Esteemed Contributor

Re: TERM is set to VT100 instead of HP

If you export the value of TERM in the profile then you will always set it to one value. Surely this should be variable depending on the terminal you are logged in at.

The best option would be to look at the console settings.

HTH,

Dave.
Aravind_3
Frequent Advisor

Re: TERM is set to VT100 instead of HP

For the HP tool STM, it is necessary to have a terminal type of "hp" or "hpterm".

With N4000 servers staged with a previous application the default terminal type was "vt100".

With N4000 servers staged with current application the default terminal type is "hp".

Background:
To execute HP specific support with the tool STM a password is necessary.

If the wrong terminal type is set up, special characters are not interpreted like they should be (example: "Backspace" will be send as "Ctrl ?").

Please provide an instruction, how such N4000 servers can be set to terminal type "hp"
Pete Randall
Outstanding Contributor

Re: TERM is set to VT100 instead of HP

Aravind,

Assuming you're talking about a 70096 console terminal, here's what you can do:

At the console keyboard,
1)press menu to get the menu on the bottom of the screen.
2)press user/system to get the system menu
3)press config keys (f8)
4)press terminal config (f5)
5)tab down to TermMode field
6)press f2 (next choice) until TermMode is hp
7)press f1 to save config
8)press menu to return to normal mode

Hope this helps,
Pete

Pete
Mark Greene_1
Honored Contributor

Re: TERM is set to VT100 instead of HP

Add the following to root's .profile:

if [ "$TERM" = "" -o "$TERM" = "hp" ]
then
eval ` tset -h -s -Q `
else
eval ` tset -s -Q `
fi

and set the term type on the console itself the way Pete suggested and you should be ok.

HTH
mark
the future will be a lot like now, only later
Aravind_3
Frequent Advisor

Re: TERM is set to VT100 instead of HP


I did modify the console settings as told by Pete Randall in the above mail.

and rebooted the machine.
When the machine came up and when i did
echo $TERM
it was set to vt100 again

This is the piece of the code in my .profile file.

It's a 700/96 console.
________________________________

# Be sure that VUE does not invoke tty commands

if [ ! "$VUE" ]; then

# Set up the terminal:
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

EDITOR=vi
export EDITOR

fi # if !VUE

________________________________________

Is anything wrong with this piece of code ?

Re: TERM is set to VT100 instead of HP

Aravind,

You've changed the behaviour of your console that that it thinks it's a HP one, but you haven't changed the Terminal ID that is reported to the OS when tset is called. Go back into the config screen where you changed the mode, and on the left hand side of the second row, you will see a field called "Terminal ID" set this to hp or 70096 and everything should be fine.

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Aravind_3
Frequent Advisor

Re: TERM is set to VT100 instead of HP

Duncan,
As you said, i changed the
TerminalID to hp ( it was 70096 before i changed )
and
TermMode to HP

in the console settings.

I rebooted the machine.

When i logged in as root and did echo $TERM it is still setting to vt100.

Where is this setting from which the machine is setting to vt100 ?

Thanks
Aravind
Pete Randall
Outstanding Contributor

Re: TERM is set to VT100 instead of HP

Aravind,

Are you sure you pressed F1 to save the config?

Try commenting out the tset code from your profile, login as root and then run the tset manually to see what it returns.

Pete

Pete
Aravind_3
Frequent Advisor

Re: TERM is set to VT100 instead of HP

I commented out the above piece of code like this :
_________________________________________
# Be sure that VUE does not invoke tty commands

#if [ ! "$VUE" ]; then

# Set up the terminal:
#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

EDITOR=vi
export EDITOR

#fi # if !VUE
___________________________________________

I exitted and logged in as root.
The term was set to vt100 again.
When i executed the tset command
The output was
Erase is backspace 74.3 $

when i executed the tset -s command
The output was
export TERM
TERM=vt100
Erase is backspace 74.3


I do not know what to do next ?

Thanks
Aravind
Pete Randall
Outstanding Contributor

Re: TERM is set to VT100 instead of HP

Aravind,

I'm sorry to say I'm at a loss here. It sounds like we have the same setup but are getting different results. When I look at my Config Keys/Term Config, the Terminal ID is set to 70096 (and there is no other choice - I'm not quite sure how you managed to change it) and my TermMode is hp. When I log in as root, my profile has the exact same tset code as yours. And my TERM gets set to hp. The only thing I can think of is that you didn't save the config by pressing f1 after you changed TermMode. If you look at TermConfig now, does it show TermMode hp?

Pete

P.S. You don't have to reboot after changing the TermConfig.

Pete
Aravind_3
Frequent Advisor

Re: TERM is set to VT100 instead of HP

Pete,
I have very much making sure that i press F1 to save the config.

Initially the Terminal ID was set to 70096.
Then i changed it to hp by typing hp and two spacebars.
I didn't use F2 key for Next choice, as there are no other choice.

It didn't help.

Later i changed the TerminalID back to 70096 and saved the config and logged in as root but terminal again is setting to vt100.
Frustrating..

The ignite i am using is B.2.4.307

Could this be an issue with the ignite itself ?
It's just a guess !

How come it is so tricky ?
Pete Randall
Outstanding Contributor

Re: TERM is set to VT100 instead of HP

Aravind,

At this point, I would say that you should force TERM to be hp in your .profile. After the tset code, just add this:
TERM=hp;export TERM

That will get it set the way you want.

Sorry we couldn't figure this out.

Pete

Pete
Mark Greene_1
Honored Contributor

Re: TERM is set to VT100 instead of HP

as another alternative, you can setup the /etc/ttytype file (man 4 ttytype) and then use this script in the .profile for root:

if [ "$TERM" = "" -o "$TERM" = "hp" ]
then
eval ` tset -h -s -Q `
else
eval ` tset -s -Q `
fi


HTH
mark
the future will be a lot like now, only later
Aravind_3
Frequent Advisor

Re: TERM is set to VT100 instead of HP

My /etc/ttytype file looks like this:

2392 conslole
2392 tty0p0
2392 tty0p1
2392 tty0p2
2392 tty0p3
2392 tty0p4
2392 tty0p5
~
~

Mark,
What should i change in the above file. ?

Thx
Aravind
Aravind_3
Frequent Advisor

Re: TERM is set to VT100 instead of HP

I did make changes to the .profile as said by Mark in the above mail.

if [ "$TERM"= "" -o "$TERM"="hp" ]
then
eval `tset -h -s -Q`
else
eval `tset -s -Q`
fi


Now after this change,
the term is now getting set to 2392 !

echo $TERM
2392

it seems it is looking to my /etc/ttytype file and picking it's value from there.

How do i make it set to 'hp' term


Thanks
Aravind


Tom Geudens
Honored Contributor

Re: TERM is set to VT100 instead of HP

Hi,
I've got the very same problem. To make it even worse (for me :-), there's a terminal next to the "problem" terminal that has exactly the same configuration, exactly the same type of terminal, and the systems are clones of each other ...

While searching for a more definite solution, I added the "-h" option to all "tset" commands in the ".profile" of root. In /etc/ttytype we have the following :
root/ref-fvs2#more /etc/ttytype
2392 console
2392 tty0p0
2392 tty0p1
2392 tty0p2
2392 tty0p3
2392 tty0p4
2392 tty0p5

It works now, but instead of having the TERM set to hp, it now gets set to 2392.

Very strange,
Tom
A life ? Cool ! Where can I download one of those from ?
Aravind_3
Frequent Advisor

Re: TERM is set to VT100 instead of HP

Is the term '2392' means 'hp' term ?
One more question,

What is 2392 ? Port number ?

Aravind
Tom Geudens
Honored Contributor

Re: TERM is set to VT100 instead of HP

Hi,
As far as I know its a type of (common) terminal. Check "man terminfo" for more information. B.t.w. sorry that my last post stated the obvious. I was testing the terminal and hadn't refreshed for new answers.

Regards,
Tom
A life ? Cool ! Where can I download one of those from ?

Re: TERM is set to VT100 instead of HP

'2392' is an HP terminal type... it should support everything you want to do.

HTH

Duncan

I am an HPE Employee
Accept or Kudo
Aravind_3
Frequent Advisor

Re: TERM is set to VT100 instead of HP

Hi Duncan,
in one of the mails above you wrote:

"Is the server a N/L/A Class or newer? "
We have a N4000 server.

"vt100 is the correct setting for the console
on these newer systems "

From which ignite image version this behaviour of setting vt100 term as default started ?
any idea.?

Any patches which has changed the default behaviour of setting term from hp to vt100 ?


Thanks
Aravind