1822197 Members
3662 Online
109640 Solutions
New Discussion юеВ

Re: TERM=hp meaning

 
Vij_Rdv
Occasional Contributor

HP-UX

Hai folks, 

Anyone explain about term=hp in hp-ux...?

7 REPLIES 7
Matti_Kurkela
Honored Contributor

Re: HP-UX

It's the default terminal type of HP terminals that were often used with HP-UX servers.

What would you need explained about it?

MK
parnassus
Honored Contributor

Re: HP-UX

@Matti_KurkelaI suspect @Vij_Rdv asked what is the meaning of HP acronym into the HP-UX name (HP Unix name). If so Wikipedia does help (here).


I'm not an HPE Employee
Kudos and Accepted Solution banner
Dennis Handly
Acclaimed Contributor

Re: TERM=hp meaning

No, he asked about TERM=hp, that @Matti_Kurkela  explained

Bill Hassell
Honored Contributor

Re: HP-UX

There are two contexts where this string might appear.

1. In /etc/profile (and possibly in $HOME/.profile), this line might appear by itself as part of terminal setup. It would appear as:

TERM=hp

But without any context, it is not possible to define the effect. The hp TERM setting refers to proprietary HP terminals manufactured during the late 1970s (2640a, etc) through the 1990s. Like many ASCII terminals models, they have a number of features beyond plain ASCII that are triggered by special sequences of characters. These features are often used in programs with menus. In HP-UX, the character version of swinstall is a good example. But setting the TERM variable in the environment to a different TERM value (wy30, vt100, tek4012, etc) that doesn't match the terminal being used, the display can be unreadable.

2. If the context for the string TERM=hp appears during a login, it may be coming from a terminal setup program such as ttytype as a result of not getting a recognisable query response from the current terminal (or terminal emulator). 



Bill Hassell, sysadmin
parnassus
Honored Contributor

Re: TERM=hp meaning

Ah...gosh...too simple (TERM vs term).


I'm not an HPE Employee
Kudos and Accepted Solution banner
James Calfas
Advisor

Re: TERM=hp meaning

When you are booting HP-UX, the message "TERM=hp" tells you what kind of terminal the operating system is expecting.  You probably will want to change your TERM environment variable to something more standard like "TERM=vt100".  If you want to know what kind of terminal emulator your desktop computer is running, the command "ttytype" will give you that information.

Bill Hassell
Honored Contributor

Re: TERM=hp meaning

The ttytype command is also the way to automatically set your TERM variable.

FYI: For standard command communication, the TERM variable is not an issue.
But for application programs and fancy scripts, the TERM value will interpret special character sequences and make the result on the screen more useful. Examples are swinstall and Glance.
When the TERM value does not match the terminal you are using (ie, PuTTY, etc), the results can be garbled.

The default .profile from HPE (actually, HP) is a very poor attempt to ID the type of terminal you are using.
For instance, PuTTY can be configured to be a vt100, vt400, etc.
Or you may be using a real HP terminal such as the 2640A or a 700/92 (glass screens).
In that case, you'll likely need to set TERM=hp or a similar value.

But it turns out that 'smart terminals' can be polled to determine the correct value.
If you add this line at the and of .profile, it will set the correct value automatically:

 

eval $(ttytype -s)

 

To see what this does, just type the comand:

 

# ttytype -s
TERM='vt100'; export TERM;
LINES=43; export LINES;
COLUMNS=121; export COLUMNS;
ERASE='^?'; export ERASE;

 

This eval statement sets all the terminal-specific values for your terminal



Bill Hassell, sysadmin