HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with terminal settings

 
SOLVED
Go to solution
dictum9
Super Advisor

Problem with terminal settings


I telnet to the console of a 2620 Ita machine while Igniting it off the Ignite server's Golden Image.

That seems to be fine but the TERM settings are messed up, I can can hardly read the output. Any idea how to fix it?

I tried

export TERM=vt100
dterm
hpterm

To no avail.




=tNETWORK CONFIGURATION#B0This system's hostname: 8saptstap %"0Internet protocol address (eg. 15.2.56.1) of this host: 8 ''0Default gateway routing internet protocol address: 8xxx.xx.52.254 )'0The subnet mask (eg. 255.255.248.0 or 0xfffff800): 8255.255.255.0 +/0IP address of the Ignite-UX server system: 8xxx.xx.52.21 -*0Is this networking information only temporary? [ No ]6#[ 8O0K ]6?[ 8C0ancel ]6b[ 8H0elp ]+j'Z


11 REPLIES
Matti_Kurkela
Honored Contributor
Solution

Re: Problem with terminal settings

Your terminal settings on HP-UX must match the setting of the telnet client you're using. Do you use a special telnet client (e.g. "Reflection for HP-UX") or a generic one that comes with your workstation OS? And if the latter, what is the workstation OS?

On a console, there is yet a third step: the management processor (MP/iLO). Are the MP's menus displaying correctly?

From the MP main menu, go to Command Menu (CM), then to the serial port configuration (CA I think) and verify the terminal type used/reported by the MP. When a HP-UX program tries to identify the terminal type, the answer to the identification request comes from the MP, not from your telnet client. This allows terminal-using programs to run succesfully even if the user disconnects from the MP.

MK
MK
Bill Hassell
Honored Contributor

Re: Problem with terminal settings

When terminal displays (other than simple command line text) have problems, setting TERM=anything is the wrong approach. Unfortunately, the standard HP-supplied /etc/profile and .profile make this situation worse by assuming that if TERM is already set, then don't do anything. But unless you are using telnet from one HP-UX box to another, the TERM value will likely be wrong.

Recognizing that there are a *lot* of telnet clients and terminal emulators out there, HP-UX supplies the best tool I have seen to identify your particular terminal: ttytype. To see it worki, type this command:

ttytype -s

and you'll see the code identify your terminal as well as setup the erase character and LINES/COLUMNS. To fix the profile problem, look at /etc/profile and .profile (I assume you are using a POSIX standard shell such as ksh or HP's POSIX shell and not a scummy csh or tcsh, etc). Find the section where $TERM is tested, something like this:

# 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


You want to scrap all that code and replace it with something like this:

######################################
tty -s
if [ $? -eq 0 ]
then
eval $(ttytype -s)
LINES=${LINES:-""}
[ "$LINES" = "" ] && eval $(resize)
stty kill "^U" intr "^C" eof "^D" -parity ixoff
stty susp \^Z dsusp \^Y
tabs
fi

######################################

This code will fix several things including the override with ttytype that won't set LINES and COLUMNS when connected to the managment port (console).

This assumes that you are using a PC running SecureCRT, QCterm, Reflection for HP, PuTTY, Attachmate, and on and on... HOWEVER, if you are using Xwindows, then HP-UX (specifically, Xterm, HPterm and DTterm) bypass normal profiles (a bad thing) so you'll also need to fix that. This is easy. Login to the HP-UX system and run this command to create .Xdefaults:

echo "*loginShell=true" >> .Xdefaults

Do this for every user's home directory (and of course make the changes above for the profiles). Now exit and login again. Check your settings with:

echo $TERM $LINES $COLUMNS

They should now match your local terminal. And now anyone can use any terminal emulator and be properly setup. The only exception is that the console (management port) should be accessed with a vt100 style terminal. As mentioned above, you can change this from vt100 to hp but so few people have HP terminal emulators that it is much safer to set the MP to vt100.


Bill Hassell, sysadmin
Bill Hassell
Honored Contributor

Re: Problem with terminal settings

Minor correction to my command line above:

echo "*loginShell=true" >> .Xdefaults

Change the =true to :true as in

echo "*loginShell:true" >> .Xdefaults

(it's an Xwindow thing)


Bill Hassell, sysadmin
dictum9
Super Advisor

Re: Problem with terminal settings

I tried putty client on a Windows and also X-Windows on a Sun workstation. Nothing works.

What specifically am I supposed to configure?
dictum9
Super Advisor

Re: Problem with terminal settings

How do I set MP to vt100?

The above code did not help.
dictum9
Super Advisor

Re: Problem with terminal settings

Control-B doesn't work, I have to physically push the on/off switch.
Bill Hassell
Honored Contributor

Re: Problem with terminal settings

> What specifically am I supposed to configure?

Do you know how to run vi to edit /etc/profile and your home directory copy of .profile? If not, I would contact the system administrator to help.

Please note that when we talk about the console, this is a special port on the back of the unit, not the HP-UX LAN connection. CTRL-B will not do anything on the standard LAN connection.


Bill Hassell, sysadmin
Steven Schweda
Honored Contributor

Re: Problem with terminal settings

> I tried putty client on a Windows and also
> X-Windows on a Sun workstation.

"X-Windows" is not a terminal emulator.
Which _terminal_emulator_ did you use on the
Sun workstation? xterm? dtterm?

> Nothing works.

You're allowed to say that only after you've
tried _everything_, which you haven't.

> I telnet to the console of a 2620 [...]

Don't these systems have different console
terminal settings? How is yours set?

Boot Option Maintenance Menu
Select Active Console Output Devices
[...]

On my rx2600, it's set to one or the
"(Vt100)" choices.

I use a DECterm (which emulates a VT300) on
my XP1000 (Alpha) workstation running VMS,
and I have no trouble.
dictum9
Super Advisor

Re: Problem with terminal settings


How do I get there on 2620? There is no such thing as MP on there. Once in EFI boot manager, I see:

HP-UX Primary Boot
Core LAN Gb A
Core LAN Gb B
EFI shell
Internal Bootable DVD
--------------------
Boot Configuration
System configuration
Security configuration

Plus looking at the Console configuration, the primary ("P") is Serial Acpi Vt100+ 9600, so vt100 should work but it doesn't.

So which option is that?


Quote:-----------------------------

On a console, there is yet a third step: the management processor (MP/iLO). Are the MP's menus displaying correctly?

From the MP main menu, go to Command Menu (CM), then to the serial port configuration (CA I think) and verify the terminal type used/reported by the MP. When a HP-UX program tries to identify the terminal type, the answer to the identification request comes from the MP, not from your telnet client. This allows terminal-using programs to run succesfully even if the user disconnects from the MP.

Steven Schweda
Honored Contributor

Re: Problem with terminal settings

> How do I get there on 2620? There is no
> such thing as MP on there.

How old is your firmware? On my zx2600,
which has no MP, the EFI menu also offers
Boot Option Maintenance Menu
Select Active Console Output Devices
which is set to
* Acpi(PNP0501,0)/Uart(9600 N81)/VenMsg(Vt100)


> "X-Windows" is not a terminal emulator.
> Which _terminal_emulator_ did you use on the
> Sun workstation? xterm? dtterm?

Do you ever answer questions, or do you only
ask them?


> [...] while Igniting it off the Ignite
> server's Golden Image.

Do normal console activities look right? Is
the problem only with this Ignite task?
Nafez ALNajjar
Frequent Advisor

Re: Problem with terminal settings

Hi,
From the system configuration---->
select active console device---->
select one that has something like
* Acpi(HWP0002,700)/Pci(1|1)/Uart(9600 N81)/VenMsg(Vt100+)------->
save to NVRAM --->restart the system to take effect


Good luck

Nafez ALNajjar