 | | From: | Joe Silagi | | Subject: | telnetd NAWS negotiation and how it affects LINES and COLUMNS | | Date: | Mon, 8 Nov 2004 12:28:52 -0800 |
|
|
 | One Sun server running 5.8 correctly sets the environment variables LINES and COLUMNS. Another server running 5.6 (Solaris2.6) fails to set LINES and COLUMNS.
From network traces I can see that NAWS gets correctly negotiated on both servers.... Sent(to host): Option( 31)NAWS Cmd=Will State=WantYes Recd(from host): Option( 31)NAWS Cmd=Do State=Yes Sent(to host): SubOption( 31)NAWS Data= 0 132 0 40
Is there a way to configure the telnetd server on the 5.6 server to get this to work correctly?
TIA
Joe Silagi WRQ, INC.
|
|
 | | From: | Hugo Villeneuve | | Subject: | Re: telnetd NAWS negotiation and how it affects LINES and COLUMNS | | Date: | Tue, 09 Nov 2004 10:29:20 -0500 |
|
|
 | Joe Silagi wrote: > One Sun server running 5.8 correctly sets the environment variables LINES > and COLUMNS. > Another server running 5.6 (Solaris2.6) fails to set LINES and COLUMNS. > > From network traces I can see that NAWS gets correctly negotiated on both > servers.... > Sent(to host): Option( 31)NAWS Cmd=Will State=WantYes > Recd(from host): Option( 31)NAWS Cmd=Do State=Yes > Sent(to host): SubOption( 31)NAWS Data= 0 132 0 40 > > > Is there a way to configure the telnetd server on the 5.6 server to get this > to work correctly? >
I beleive the responsability of setting up and updating LINES and COLUMNS belong to your shell.
Telnetd should install to window size information into the kernel terminal data via the TIOCSWINSZ ioctl. (And that every time it is resized.)
Can't you verify that by running /usr/bin/stty -a on 5.6?
Any C applications should use the apporpriate TIOCGWINSZ ioctl instead of LINES/COLUMNS.
|
|
 | | From: | Joe Silagi | | Subject: | Re: telnetd NAWS negotiation and how it affects LINES and COLUMNS | | Date: | Tue, 9 Nov 2004 09:10:58 -0800 |
|
|
 | On the 5.6 stty -a doesn't show rows or columns. $ stty -a speed 38400 baud; eucw 1:0:0:0, scrw 1:0:0:0
However the 5.8 system does... $ stty -a speed 38400 baud; rows = 24; columns = 80; ypixels = 0; xpixels = 0; csdata ? eucw 1:0:0:0, scrw 1:0:0:0
The application is curses based... even vi affected by this.
I will explore the idea of the shell not setting LINES and COLUMNS.
Thanks again,
-joe
"Hugo Villeneuve" wrote in message news:2vc62iF2jc2boU1@uni-berlin.de... > Joe Silagi wrote: > > One Sun server running 5.8 correctly sets the environment variables LINES > > and COLUMNS. > > Another server running 5.6 (Solaris2.6) fails to set LINES and COLUMNS. > > > > From network traces I can see that NAWS gets correctly negotiated on both > > servers.... > > Sent(to host): Option( 31)NAWS Cmd=Will State=WantYes > > Recd(from host): Option( 31)NAWS Cmd=Do State=Yes > > Sent(to host): SubOption( 31)NAWS Data= 0 132 0 40 > > > > > > Is there a way to configure the telnetd server on the 5.6 server to get this > > to work correctly? > > > > I beleive the responsability of setting up and updating LINES and > COLUMNS belong to your shell. > > Telnetd should install to window size information into the kernel > terminal data via the TIOCSWINSZ ioctl. (And that every time it is resized.) > > Can't you verify that by running /usr/bin/stty -a on 5.6? > > Any C applications should use the apporpriate TIOCGWINSZ ioctl instead > of LINES/COLUMNS.
|
|