On 2022-01-26 1:45 p.m., Tim Woodall wrote:
I have to use PuTTY to connect to a debian server. For reasons that are
outwith my control the ssh session disconnects every 24 hrs.
Therefore I run screen so after reconnecting I can recover to whereever
I was at.
However, the PuTTY window does not resize to whatever it was previously.
I can find lots of questions asking how to turn this feature off but
nothing on why it doesn't work for me.
As far as I know this is not a screen feature. Putty controls the window
size, it is determined by the default or whatever is saved for that session.
You can change what happens when you resize the putty window on the machine
running putty. There is no way for you to change the putty screen from the
debian side.
Screen does provide commands to resize the virtual terminal, however neither
putty nor xterm seem to support the termcap commands (apparently it is Z0 and
Z1).
What happens when you try to resize the screen using screen's windowing
commands:
^a : width 50
^a : height 15
(control-a, then colon, then width 50, then enter)
In my case I get a message that
Your termcap does not specify how to change the terminal's width to 50
and
Your termcap does not specify how to change the terminal's height to 15
That is with TERM set to xterm.