putty+ssh+screen = auto resizing?

View: New views
10 Messages — Rating Filter:   Alert me  

putty+ssh+screen = auto resizing?

by Aaron Griffin :: Rate this Message:

| View Threaded | Show Only this Message

Hey guys,
It's probably not all that important that the context of this is while
running screen via a putty session, though it could be related to
other things.

When I "screen -R" or "screen -RD", the window is always resized
rather small.  I have putty setup to be larger that the standard 80
column window, but it always seems to flip back to 80ish columns when
I reattach.

On a related note, in a normal fullscreen terminal (and emulator),
things that use progress bars (wget, et al) span the entire width of
the terminal, but when under screen they seem to span the same 80ish
column area.

Now, I have no hard facts, but I'm pulling at straws - it seems that
screen is set to use 80 column widths by default.  Is there anyway I
can:
a) use a typical wide terminal (132 columns)
or more ideally:
b) tell screen to use whatever width the parent terminal reports

Thanks in advance


_______________________________________________
screen-users mailing list
screen-users@...
http://lists.gnu.org/mailman/listinfo/screen-users

Re: putty+ssh+screen = auto resizing?

by Geraint Edwards :: Rate this Message:

| View Threaded | Show Only this Message

Aaron Griffin <aaronmgriffin@...> said
                (on Tue, Oct 04, 2005 at 10:46:51AM -0500):
> When I "screen -R" or "screen -RD", the window is always resized

Try
        screen -RA
or
        screen -RAD

--
Geraint A. Edwards (aka "Gedge")
gedge@...


_______________________________________________
screen-users mailing list
screen-users@...
http://lists.gnu.org/mailman/listinfo/screen-users

Re: putty+ssh+screen = auto resizing?

by Aaron Griffin :: Rate this Message:

| View Threaded | Show Only this Message

On 10/4/05, Geraint Edwards <gedge-lists@...> wrote:
>         screen -RA
>         screen -RAD

Aha! Thanks!

Is there anyway to force this to always be the case? Is there a config setting?

Either way, it's pretty (lame joke in 5...4...3...2...) RAD!


_______________________________________________
screen-users mailing list
screen-users@...
http://lists.gnu.org/mailman/listinfo/screen-users

Re: putty+ssh+screen = auto resizing?

by Brian Mathis :: Rate this Message:

| View Threaded | Show Only this Message

Aaron Griffin wrote:
> Hey guys,
> It's probably not all that important that the context of this is while
> running screen via a putty session, though it could be related to
> other things.
>
> When I "screen -R" or "screen -RD", the window is always resized
> rather small.  I have putty setup to be larger that the standard 80
> column window, but it always seems to flip back to 80ish columns when
> I reattach.

Wow, I have a draft message started with this exact same question.

I use putty at 132 cols, and it's very frustrating that I have to resize
after starting screen.  You can use C-a W to switch into 132 mode, but
screen really should be able to detect this.

I've dealt with it in the past by forbidding putty to allow resizes, but
then I can't make the window any bigger if I need it.


> On a related note, in a normal fullscreen terminal (and emulator),
> things that use progress bars (wget, et al) span the entire width of
> the terminal, but when under screen they seem to span the same 80ish
> column area.
>
> Now, I have no hard facts, but I'm pulling at straws - it seems that
> screen is set to use 80 column widths by default.  Is there anyway I
> can:
> a) use a typical wide terminal (132 columns)
> or more ideally:
> b) tell screen to use whatever width the parent terminal reports
>
> Thanks in advance


_______________________________________________
screen-users mailing list
screen-users@...
http://lists.gnu.org/mailman/listinfo/screen-users

Re: putty+ssh+screen = auto resizing?

by Brian Mathis :: Rate this Message:

| View Threaded | Show Only this Message

Geraint Edwards wrote:

> Aaron Griffin <aaronmgriffin@...> said
> (on Tue, Oct 04, 2005 at 10:46:51AM -0500):
>
>>When I "screen -R" or "screen -RD", the window is always resized
>
> Try
> screen -RA
> or
> screen -RAD
>

This only seems to work when resuming a screen session.  When starting a
new screen, it still resizes to 80 cols.


_______________________________________________
screen-users mailing list
screen-users@...
http://lists.gnu.org/mailman/listinfo/screen-users

Re: putty+ssh+screen = auto resizing?

by Fredrik Tolf :: Rate this Message:

| View Threaded | Show Only this Message

On Tue, 2005-10-04 at 11:20 -0500, Aaron Griffin wrote:
> On 10/4/05, Geraint Edwards <gedge-lists@...> wrote:
> >         screen -RA
> >         screen -RAD
>
> Aha! Thanks!
>
> Is there anyway to force this to always be the case? Is there a config setting?

Looking at the screen manpage:

"By default, screen tries to restore its old window sizes when
attaching to resizable terminals (those with "WS" in its description,
e.g. suncmd or some xterm)."

I don't know what terminal name Putty sends, but it seems that you can
A) put WS in the terminfo for that terminal name or B) maybe configure
Putty to send another terminal name (such as xterm).

Hope it helps.

Fredrik Tolf




_______________________________________________
screen-users mailing list
screen-users@...
http://lists.gnu.org/mailman/listinfo/screen-users

Re: putty+ssh+screen = auto resizing?

by Michael Schroeder :: Rate this Message:

| View Threaded | Show Only this Message

On Tue, Oct 04, 2005 at 01:06:26PM -0400, Brian Mathis wrote:
> This only seems to work when resuming a screen session.  When starting a
> new screen, it still resizes to 80 cols.

That's probably because the terminfo entry of your terminal contains
a resize code in the 'is2' aka termcap 'is' string.
You can use screen's termcapinfo command to set it to a string without
the resize part.

Cheers,
  Michael.

--
Michael Schroeder           mlschroe@...
main(_){while(_=~getchar())putchar(~_-1/(~(_|32)/13*2-11)*13);}


_______________________________________________
screen-users mailing list
screen-users@...
http://lists.gnu.org/mailman/listinfo/screen-users

putty+ssh+screen = auto resizing?

by Andrew McGlashan :: Rate this Message:

| View Threaded | Show Only this Message

Hi,

I just come across this problem.

And I've worked out the solution.

In my case, a putty session that worked perfectly has TERM set as xterm
and ones that gave the resize issue were xterm-color ... that was the
only difference in the setups.

So, I worked on this and found that all I needed to do was adjust
/etc/screenrc as follows.

old line:
termcapinfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'

new line (added * character)
termcapinfo xterm* 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'


Leading to this discovery, I tried changing TERM from xterm-color to
xterm and the desired behaviour took place; then I worked through
screenrc settings as necessary to get the "good" solution for this problem.

Cheers

--
Kind Regards
AndrewM

Andrew McGlashan
Broadband Solutions now including VoIP

Current Land Line No: 03 9912 0504
Mobile: 04 2574 1827 Fax: 03 9012 2178

National No: 1300 85 3804

Affinity Vision Australia Pty Ltd
http://www.affinityvision.com.au
http://adsl2choice.net.au

In Case of Emergency --  http://www.affinityvision.com.au/ice.html

_______________________________________________
screen-users mailing list
screen-users@...
http://lists.gnu.org/mailman/listinfo/screen-users

putty+ssh+screen = auto resizing?

by Andrew McGlashan :: Rate this Message:

| View Threaded | Show Only this Message

Hi,

I just come across this problem.

And I've worked out the solution.

In my case, a putty session that worked perfectly has TERM set as xterm
and ones that gave the resize issue were xterm-color ... that was the
only difference in the setups.

So, I worked on this and found that all I needed to do was adjust
/etc/screenrc as follows.

old line:
termcapinfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'

new line (added * character)
termcapinfo xterm* 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'


Leading to this discovery, I tried changing TERM from xterm-color to
xterm and the desired behaviour took place; then I worked through
screenrc settings as necessary to get the "good" solution for this problem.

Cheers

--
Kind Regards
AndrewM

Andrew McGlashan
Broadband Solutions now including VoIP

Current Land Line No: 03 9912 0504
Mobile: 04 2574 1827 Fax: 03 9012 2178

National No: 1300 85 3804

Affinity Vision Australia Pty Ltd
http://www.affinityvision.com.au
http://adsl2choice.net.au

In Case of Emergency --  http://www.affinityvision.com.au/ice.html


_______________________________________________
screen-users mailing list
screen-users@...
http://lists.gnu.org/mailman/listinfo/screen-users

Re: putty+ssh+screen = auto resizing?

by Mau Guertin :: Rate this Message:

| View Threaded | Show Only this Message

> In my case, a putty session that worked perfectly has TERM set as
> xterm and ones that gave the resize issue were xterm-color ... that
> was the only difference in the setups.
>
> So, I worked on this and found that all I needed to do was adjust
> /etc/screenrc as follows.
>
> old line:
> termcapinfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
>
> new line (added * character)
> termcapinfo xterm* 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'

I know this thread is old, I would just like to point out that your
solution worked _only_ if I make that change in my user's ~/.screenrc

Adding the "* character" after "xterm" in /etc/screenrc had no effect
for me (I am on Arch Linux if that matters).

And actually things look a tad different here; I copied the two lines
below from /etc/screenrc to my ~/.screenrc (added the "* character"):

        termcap xterm* 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
        terminfo xterm* 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'

Weird though, I would have thought the global change you recommended
in /etc/screenrc would affect all users, I guess it may depend on the
distro one is using?

But other than that, your solution worked perfectly.

On a related note, here is a link describing another way of resolving
this annoyance; note it doesn't involve /etc/screenrc or ~/.screenrc,
so it may be a more 'universal' solution, given the fact that it would
not be dependent on the terminal (or termcap / terminfo):

http://aperiodic.net/screen/appearance#screen_resizing_despite_-a_when_using_putty_on_windows_iterm2_on_mac_os_x