Re: Setting Column and Row Size
- From: Frank Mertens <frank@xxxxxxxxxxx>
- Date: Thu, 29 May 2008 01:51:11 +0200
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
.
- References:
- Setting Column and Row Size
- From: dd
- Setting Column and Row Size
- Prev by Date: Setting Column and Row Size
- Next by Date: How do you change text colors?
- Previous by thread: Setting Column and Row Size
- Next by thread: How do you change text colors?
- Index(es):
Relevant Pages
|