Re: gnu screen and resizing terminal window

2022-01-27 Thread Tim Woodall

On Wed, 26 Jan 2022, Bijan Soleymani wrote:


On 2022-01-26 5:55 p.m., Bijan Soleymani wrote:
Actually apparently putty does support remote resizing. It just seems that 
our systems lack the right termcap entries.


I managed to resize the putty window by running the command:
resize -s height width

so:
resize -s 24 80

Also adding this:
termcapinfo xterm WS=\E[8;%d;%dt

to:
/etc/screenrc

Allows screen to resize the putty session (with the :width and :height 
commands).


But when quitting/restarting screen it puts the putty and the screen session 
back to the original size.




Thanks, that gives me something to investigate. At the moment, adding
that causes the screen to resize to 80x24 when I attach or detatch which
is not what I want but it gives me something to explore.

Tim.



Re: gnu screen and resizing terminal window

2022-01-27 Thread Tim Woodall

On Wed, 26 Jan 2022, Bijan Soleymani wrote:




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.



Thanks, that seems to be it.

I also get: (from outside screen)

$ resize 80 50
resize: Can't set window size under VT100 emulation

which I'm sure I already tested and it worked but I must have been doing
something different!



Re: gnu screen and resizing terminal window

2022-01-26 Thread Bijan Soleymani

On 2022-01-26 5:55 p.m., Bijan Soleymani wrote:
Actually apparently putty does support remote resizing. It just seems 
that our systems lack the right termcap entries.


I managed to resize the putty window by running the command:
resize -s height width

so:
resize -s 24 80

Also adding this:
termcapinfo xterm WS=\E[8;%d;%dt

to:
/etc/screenrc

Allows screen to resize the putty session (with the :width and :height 
commands).


But when quitting/restarting screen it puts the putty and the screen 
session back to the original size.


Bijan



Re: gnu screen and resizing terminal window

2022-01-26 Thread Bijan Soleymani

On 2022-01-26 5:42 p.m., Bijan Soleymani wrote:
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.


Actually apparently putty does support remote resizing. It just seems 
that our systems lack the right termcap entries.


Bijan



Re: gnu screen and resizing terminal window

2022-01-26 Thread Bijan Soleymani




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.

Bijan



Re: gnu screen and resizing terminal window

2022-01-26 Thread Andrei POPESCU
On Mi, 26 ian 22, 18:45:41, 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.
> 
> I'm not wedded to screen - about the only feature I'm using is the
> scrollback buffer - so a change change to tmux is possible if that will
> help but I'd really like the resizing to work. Does this work for
> anyone?

As far as I recall the screen window size is limited to the smallest 
terminal that is connected to the particular session.

Maybe screen thinks there are other connections still present?

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser


signature.asc
Description: PGP signature


gnu screen and resizing terminal window

2022-01-26 Thread Tim Woodall

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.

I'm not wedded to screen - about the only feature I'm using is the
scrollback buffer - so a change change to tmux is possible if that will
help but I'd really like the resizing to work. Does this work for
anyone?

(long term I'm hoping to get permission to install cygwin and then use a
X server and xterms and ssh from inside them or, even better, a debian
laptop, but for now I'm stuck with putty)

Tim.