1820390 Members
3886 Online
109623 Solutions
New Discussion юеВ

vi with tsm

 
SOLVED
Go to solution
wojtek75
Frequent Advisor

vi with tsm

HP-UX 11.11
tsm 2.2.4d

Hello,

I connect to a machine with HP-UX with putty.
After that there is no problem with using vi.
When I run tsm and run vi, it "fills" only
upper part of the putty window. I mean vi
fixes its command line in the middle of the
window (about 24 lines from the top)
instead of the bottom of the window as it does
as usual. This line is also a baseline for
scrolling etc.

I used different values of TERM and TSMTERM,
stty and resize with no success. Does anybody
has an idea what is wrong with tsm?

I appreciate any help.
wojtek
10 REPLIES 10
Steven E. Protter
Exalted Contributor

Re: vi with tsm

Shalom wojtek,

24 lines 80 columns per line is the standard terminal interface.

I don't know why you'd expect more than that.

Any reason why you're not using pure putty? It works fine.

You should be able to change the putty scroll settings and see enough history to work on the system.

Perhaps reveal what TERM settings you are using and maybe someone more familiar with tsm can help.

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
Torsten.
Acclaimed Contributor

Re: vi with tsm

Any warning when you start tsm?

Try this before starting tsm:

# export TERM=vt100
# tsm

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
wojtek75
Frequent Advisor

Re: vi with tsm

Hi,

after starting tsm I can see standard output:

Terminal type is: vt100. TSM Terminal type is: vt100.

# TSM vt100 (80 column only) description file 05/18/90
# generic vt100 - see also wy60vt100 es3vt100 es3vt100-2.
# See also Vt100 for 80/132 columns.
#
# !!! IMPORTANT NOTE !!!
# Set Terminal to: XON/XOFF MODE
#

Before running tsm I maximize putty window. Before tsm, vi can see the whole window. When tsm is started, vi can see only first 24 lines of the screen. The problem is the same when TERM is set to vt100, Vt100, vt220 etc.

Regards,
wojtek
Jov
Honored Contributor

Re: vi with tsm

Find out the rows and columns set within Putty, then set it with 'stty rows <#> columns <#>'.

I think HP-UX might have a reset command to re-initialise the terminal.


Jov
wojtek75
Frequent Advisor

Re: vi with tsm

The attempts with stty, reset or clear doesn't solve the problem.

Regards,
wojtek
Jov
Honored Contributor

Re: vi with tsm

This issue is usually a mismatch of stty and/or TERM.

Can you post the stty and env output?


Jov
wojtek75
Frequent Advisor

Re: vi with tsm

OK,

I attach file with required output.
Torsten.
Acclaimed Contributor

Re: vi with tsm

This application is historical used with "real" terminals.
Also the man page says

"WARNINGS

Some operations are not supported on certain terminals."

There are a lot of setting files in /usr/tsm/term with many settings, among them are fixed numbers of lines.
e.g. see
more /usr/tsm/term/more vt220sw7-m.fi

I would not change any of this settings, but I would simply open another putty session.

Perhaps one of the terminal gurus can explain more details.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Bill Hassell
Honored Contributor
Solution

Re: vi with tsm

The first thing to do is to NOT set TERM to a fixed value. HP-UX has a very useful program called ttytype that will correctly identify your PuTTY terminal emulator and should be used in your login profile:

eval $(ttytype -s)

To see what this does, just type: ttytype -s

Now you will see that PuTTY by itself is set to 80 chars by 24 lines, all very standard -- *UNLESS* you resized the terminal window. Resizing may look trivial but there are major issues when you do this. First, you can resize the window and everything gets bigger, but still the character grid is 80x24. But more commonly, your resize left the characters the same size but the grid changed radically, to perhaps 120x48. Now a 'good' terminal emulator will use a special telnet subcode to tell the HP-UX terminal driver to change COLUMNS and LINES. If not, you must manually run resize or ttytype like this:

eval $(resize)
or
eval $(ttytype -s)

This is what allows your PuTTY terminal to work with vi correctly.

However, tsm makes this very messy because it is yet another terminal handler, designed when everyone was using a dialup modems to talk to their computers. According to the program's timestamp, it was last updated in 2000, about 7 years ago, by a company called Structured Software Solutions, Inc (SSSI) which is now FacetCorp. And it turns out that tsm is overriding your PuTTY terminal identification and size. If you run ttytype -s in your tsm window, the TERM value may be different but COLUMNS=80, LINES=24. That's bad. This is a design defect that will probably never be fixed. Even manually setting COLUMNS and LINES doesn't fix the problem with vi.

So if you really, really need to use tsm, resize your PuTTY window back to 80x24 and it should work OK. Otherwise, start multiple copies of PuTTY on your PC and use ATL-TAB to instantly switch between sessions.


Bill Hassell, sysadmin
wojtek75
Frequent Advisor

Re: vi with tsm

OK, I follow your instructions.

Thank you for your help.

Regards,
wojtek