1830877 Members
1742 Online
110017 Solutions
New Discussion

dtterm and LINES setting

 
SOLVED
Go to solution
Dave Burton_5
Occasional Advisor

dtterm and LINES setting

When I start a dtterm using the geometry option against the local machine, LINES is set correctly, i.e. if I run:

dtterm -display $DISPLAY -geometry 96x12+98+98

LINES is set to 12 in the new dtterm.

If I run the same command under remsh, then the LINES setting sometimes gets messed up, e.g. if I run

remsh remotehost dtterm -display $DISPLAY -geometry 96x12+98+98

LINES might come out at 13.

Why is that?

1 REPLY 1
Bill Hassell
Honored Contributor
Solution

Re: dtterm and LINES setting

remsh is a very different network protocol. It is not telnet without a password. Indeed, remsh is really awful with interactive processes. When you start dtterm with a specific geometry, it sets the terminal's emulation size. Then a telnet connection will negotiate about window size (NAWS in telnet terminolgy, see http://www.faqs.org/rfcs/rfc1073.html).

Changing the dtterm window size generates a SIGWINCH sondition (Window Size change) and the remote telnet destination will be notified of the new values and set LINES and COLUMNS automatically.

remsh does not do any of this type of protocol, thus the problem. You can avoid this problem by running resize or ttytype. Either program will query the terminal (dtterm) as to the current settings and generate the shell commands to change the settings. Use either one like this:

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

To see what they actually do, just type resize or ttytype -a. For a remsh connection, you'll have to do this every time you change the window size.


Bill Hassell, sysadmin