Re: Setting Column and Row Size



dd wrote:
All,

I've been coding an SSH client for fun and learning (using C# and a richtextbox), and I've noticed that my (OpenSSH) server sends "\r" characters after every 80 characters of output. How can I have my client set the row and column size? I would like to do this dynamically when the window is resized as well. Are there any limitations to the row and column size values?

Thanks,
Dan

I don't know the SSH protocol very well, but I know a bit of terminals.
If I understand section 6.7. of RFC4254 correctly the standard ssh
client sends a channel request of type "window-change" when its window
dimensions change. The ssh server will translate this request to
a TIOCSWINZ ioctl on the connected pseudo terminal. The operating
system will generate a signal of type SIGWINCH send to the process
group of the shell. A common shell would then use TIOCGWINZ ioctl
to get the window size and set its environment variables accordingly
(LINES, COLUMNS). I think it is also the remote shell which generates
the CR at column 80.
As far as I know the maximum size of the window is only limited
by the applications you run on the remote host.
For instance in 8-bit mode the xterm control sequences limit
the clickable region to 224x224, because of the special coordinate
coding used for mouse events.

--
Frank
.



Relevant Pages

  • Re: Winnet HttpAddRequestHeaders in Chinese
    ... >Window 2003, Server received garbled text for Chinese ... >characters only. ... client to send the HttpRequest header, the server will receive the garbled ...
    (microsoft.public.vc.mfc)
  • Re: Rem Desktop conflict with Interactive Logon Message
    ... > for users" window is not sent to the RD client. ... In the Group Policy window, which is focused on the Default Domain ... Security Settings, then to Local Policies, and select Security Options. ...
    (microsoft.public.windowsxp.work_remotely)
  • Multiple issues with Mac OS X AFP client
    ... Multiple issues with Mac OS X AFP client ... connections to an Apple file server over SSH - a commendable effort to ... .GlobalPreferences.plist (the AFP client does not follow Apple's ...
    (Bugtraq)
  • [Full-Disclosure] Multiple issues with Mac OS X AFP client
    ... Multiple issues with Mac OS X AFP client ... connections to an Apple file server over SSH - a commendable effort to ... .GlobalPreferences.plist (the AFP client does not follow Apple's ...
    (Full-Disclosure)
  • Multiple issues with Mac OS X AFP client
    ... Multiple issues with Mac OS X AFP client ... connections to an Apple file server over SSH - a commendable effort to ... .GlobalPreferences.plist (the AFP client does not follow Apple's ...
    (Full-Disclosure)