> > Instead of just playing nethack, I've been building a client that > > would log in to nethack@xxxxxxx and using a pipe to get the login data > > from pwsafe directly onto the server. > > All of this works brilliantly after playing with some stty magic (full > > script in [0]), however, this way the terminal size is burned into > > 80x24, which is way smaller than my graphical terminal. > > > > Anyway, I proceeded grepping some of the openssh source code and wrote > > this patch [1], which I have locally tested with great success. > > The problem with doing it via enviornment variables is that they > will become invalid if the client ever changes the size of their > window. TTYs support sending SIGWINCH for this and OpenSSH handles > this already. > > Your program should be able to get the correct window size at any > time using: > > struct winsize ws; > if (ioctl(ttyfd, TIOCGWINSZ, &ws) != 0) > error(...); The "script" version of that is calling "tput cols" and "tput lines", parsing the text output as integers... _______________________________________________ openssh-unix-dev mailing list openssh-unix-dev@xxxxxxxxxxx https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev