Operating System - HP-UX
1752290 Members
5361 Online
108786 Solutions
New Discussion юеВ

Re: 'linux' terminal support in HP UX 11.23

 
John O'Neill_6
Regular Advisor

'linux' terminal support in HP UX 11.23

Hi,

We've recently just migrated from PA-RISC HP U 11.22 to ITANIUM HP UX 11.23.

However an issue we've found is that some of our legacy clients which are based on LINUX are unable to work properly due to the fact that the terminal type of 'linux' is unknown.

It worked just fine in HP UX 11.22, but it seems that HP UX 11.23 doesn't recognise this terminal type.

When they log on they get a terminal type of 'UNKNOWN'.

Our application environment (Progress OpenEdge 10.1C) DOES understand the terminal of 'linux' (and has its own termcap dubbed protermcap entries for it).

What can I do?
Why does HP UX 11.23 NOT support this terminal type whilst the older 11.22 did?!

This is causing me some real grief. I don't want to throw out the old thin client terminals as they're still very good.

We have a workaround in place for now using a PC instead of the thin clients but our users prefer the Linux based terminals.

Any ideas?

-John
11 REPLIES 11
Dennis Handly
Acclaimed Contributor

Re: 'linux' terminal support in HP UX 11.23

There was no PA version of 11.22, did you mean 11.11?

>When they log on they get a terminal type of 'UNKNOWN'.

What caused it to be "linux" before? Hard coded in .profile? Or the terminals returned that string?

>What can I do?

Set the value of TERM to linux?
John O'Neill_6
Regular Advisor

Re: 'linux' terminal support in HP UX 11.23

Hi,

Sorry, it was 11.11 U 9000/9000 on the PA-RISC machine.

The terminals are based on LTSP, running off Red Had 9.

They just open a TELNET session to the designated host.

They identify themselves are type 'Linux'.

-John
Dennis Handly
Acclaimed Contributor

Re: 'linux' terminal support in HP UX 11.23

John O'Neill_6
Regular Advisor

Re: 'linux' terminal support in HP UX 11.23

No Joy i'm affraid...

The UNIX system (11.23) comes back with 'Unknown Terminal type linux'.

My Progress application comes up and the screen/menu appear ok even with bolding and highlighting etc.

But my Function keys and backspace keys don't work...I have to use CTRL-X to achieve same thing as a 'F1' key.

I was wondering..

Could I put something in the .profile to set up the F1, F2, F4 and BACKSPACE/DEL keys for 'unknown' terminal tpes.

We're going to be retiring these LTSP based consoles later this year with HP thin clients that use SSH anyway.

That would get my LTSP based Linux clients up and running.

John O'Neill_6
Regular Advisor

Re: 'linux' terminal support in HP UX 11.23

I know we're not supposed to set any hard coded TERM values in the .profile, i've tried evaluating $TERM after terminal identification takes place to various things:

xterm
vt100
wy60
linux (Progress has a terminal type in its PROTERMCAP file for 'linux').

No joy... can get progress application to run, seems to dispaly everything correctly, just need to sort out the Function keys, backspace and delete and good to go.

-John
Dennis Handly
Acclaimed Contributor

Re: 'linux' terminal support in HP UX 11.23

>The UNIX system (11.23) comes back with 'Unknown Terminal type linux'.

What command gives this error?

I'm not sure if ttytype(4) would help? (I guess your system returns the type but not recognized?)

If you still have your 11.11 system around, you may be able to copy your old terminfo(4) files for linux?
Bill Hassell
Honored Contributor

Re: 'linux' terminal support in HP UX 11.23

There is no need to dump the "Linux" terminals. They belong to a very large family of character-mode terminals and terminal emulators. HP-UX is one of the very few Unix's that understands hundreds of different models. The reason you see TERM=linux is that you are using the default /etc/profile where the (archaic) code checks to see if the TERM value was preset when the terminal logged in. This code assumes that 100% of all incoming connections come from HP-UX systems. It turns out that protocols such as telnet have subcodes that communicate certain features between systems. One of these options presets the TERM variable. As long as the incoming system is using one the hundreds of terminal models listed in the terminfo database (see: ll /usr/lib/terminfo/terminfo/*/*) then it may work.

I say "may work" because an incoming system may say it uses a certain terminal protocol but may not. HP recognized this problem a long time ago and created a terminal identifier program: ttytype. What the program does is to query the terminal with the 3 most common terminal categories. If one query fails, the program times out and tries another. Once a response is seen, some additional codes are sent to further identify the exact model and set TERM, LINES, COLUMNS and ERASE. Try this:

ttytype -s

You'll see that the terminal is queried and for your Linux terminals, some version of vt100 series will be returned.

The problem is that the default code in /etc/profile bypasses this critical setup if TERM is already set. This makes no sense because there is no reason to expect that other systems set the TERM value correctly in the communication protocol.

So replace all this archaic code in /etc/profile:

# set term if it's not set



if [ "$TERM" = "" -o "$TERM" = "unknown" -o "$TERM" = "dialup" \
-o "$TERM" = "network" ]
then
eval `ttytype -s -a`
fi

export TERM

# set erase to ^H, if ERASE is not set
if [ "$ERASE" = "" ]
then
ERASE="^H"
export ERASE
fi
stty erase $ERASE



with this one line:

eval $(ttytype -sa)

Now, every terminal will be identified at login and the appropriate settings will be in force.


Bill Hassell, sysadmin
John O'Neill_6
Regular Advisor

Re: 'linux' terminal support in HP UX 11.23

Hi,

Really appreciate the help so far :) However i am still stuck :(

Here's what my profile has to say about terminals.

# Be sure that VUE does not invoke tty commands
if ! "$VUE" ];then # set term if it's not set
if [ "$TERM" = "" -o "$TERM" = "unknown" -o "$TERM" = "dialup" -o "$TERM" = "network" ]

then
eval `ttytype -a`
fi
export TERM

So I don't get it... when the login process runs I see 'Unknown Terminal type linux' appearing before I get the odd output.

Yet when i set another user which doesn't run the application and get a shell.. then type ttytype -s -a' it reports
VT100
Columns 80
Lines 24
DELETE=^?

Which is odd.

Any more ideas?

Dennis Handly
Acclaimed Contributor

Re: 'linux' terminal support in HP UX 11.23

>when the login process runs I see 'Unknown Terminal type linux' appearing before I get the odd output.

What odd output? You may have to add echo statements in your /etc/profile or .profile to track this down.

>Yet when I set another user which doesn't run the application and get a shell. then type ttytype -s -a' it reports: VT100 ..

So this isn't linux.
What happens if you do: eval `ttytype -s -a`
Then invoke your application?