1834232 Members
2573 Online
110066 Solutions
New Discussion

Terminal problem

 
Jun Zhang_4
Regular Advisor

Terminal problem

I'm using AccuTerm. The telnet session to hpux 11.11 is using termtype vt220. The command
swlist -s /cdrom
will change the TERM to tektronix 4014, background becomes black, and the texts are very small to be recognized. Probably the content is the correct output from swlist.

Jun
Food lover
6 REPLIES 6
Steve Bonds
Trusted Contributor

Re: Terminal problem

The "swlist" command doesn't produce any terminal control output, though it's possible that something has a strange name that's triggering the problem.

Try setting your TERM to vt100 explicitly. (i.e. "export TERM=vt100").

You might also try redirecting the swlist output to a file and viewing that file in vi or another editor. That should reveal what is messing up your terminal.

Lastly, you can also disable the Tektronix graphics modes in AccuTerm if you can't find any other solution.

-- Steve
Steven E. Protter
Exalted Contributor

Re: Terminal problem

vt100 will fix this some of the time.

If it does not, try connecting for this application with a color aware terminal emulation.

I would suggest Linux X Windows or Hummingbird or Reflections, even this:

http://www.chiark.greenend.org.uk/~sgtatham/putty/

The last choice is quite color aware and can be set to defeat all but the most determined color setters.

Its SSH which is far superior to telnet.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Bill Hassell
Honored Contributor

Re: Terminal problem

Are you logging in using telnet? If so, do not run swlist or swinstall or sam until you first:

echo $TERM
ttytype

If these two commands are not the same, your TERM variable is being preset by your local client (PC? Linux?) and it will almost always be wrong. Standard HP-UX /etc/profile has the following code:

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

export TERM

This code (written many years ago) assumed that the client would set $TERM correctly through the telnet connection protocol. But PCs and other flavors of Unix have little in common with the $TERM definitions used by HP-UX. So the above code says: if TERM hasn't set, query the terminal and set TERM. Otherwise, do nothing. To set the TERM value correctly, replace all the above code with:

eval $(ttytype -s)

The reason the swlist seemed to change the AccuTerm window is likely due to a TERM mismatch. TERM may have been set to ansi or some other value by your local computer and swlist sent escape sequences that were proper for that TERM value but meant something entirely different for the current setting in AccuTerm. To verify this, set AccuTerm to vt220, then set TERM=vt220 and run swlist again.


Bill Hassell, sysadmin
Jun Zhang_4
Regular Advisor

Re: Terminal problem

Thank you for the replies.
ttytype output is vt100, and I changed the TERM to that, too. But the problem is the same.
Go from the pc cygwin seems ok.

Jun
Food lover
A. Clay Stephenson
Acclaimed Contributor

Re: Terminal problem

What you are describing is impossible. A child is NEVER allowed to alter the environment of the parent.

Consider this:
TERM=vt100
export TERM

swlist -s /cdrom # A CHILD PROCESS

echo "TERM=\"${TERM}\""

If the situation is as you describe, swlist would somehow have to alter TERM in the parent shell; that just can't happen. I am NOT saying that TERM is not being reset; I'm just saying that it is not happening as you describe.
If it ain't broke, I can fix that.
Sridhar Bhaskarla
Honored Contributor

Re: Terminal problem

Hi Jun,

As explained before, your Accuterm is interpreting the control sequences and changing *it's* Terminal Type to Tektronix automatically. I am not talking about the TERM on the session.

Did you modify the default options of Accuterm?. You may want to reset them to default and try. Or try saving the current settings into a file and attach it so that we will see if we can find anything.

-Sri

You may be disappointed if you fail, but you are doomed if you don't try