3

I run a console window through my PuTTY session.

That console windows has a column width of 140.

When I start the screen session, the console shrinks to 80 columns.

I do not see this behavior on CentOS 5, only on CentOS 6.

Does anybody know what has to be tweaked?

3 Answers 3

0

Most likely, init sequence in screen's terminal description includes an explicit request to set 80-column mode -- \033 [ ? 3 l. Check contents of is/is2 sequences in terminfo string when running screen -- either echo $TERMINFO or infocmp should show that.

0

Sorry, forgot to answer with my own solution to this problem.

Turns out CentOS 6 disables this line in its /etc/screenrc script:

termcapinfo  xterm Z0=\E[?3h:Z1=\E[?3l:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l

I was able to restore the functionality by putting this line into my local ~/.screenrc file.

Here is the content of my ~/.screenrc file in its entirety

# Fix termcapinfo for xterm to allow column resizing
# xterm emulation is used by PuTTY

termcapinfo  xterm Z0=\E[?3h:Z1=\E[?3l:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l

If you are a sysadmin, you may want to put this .screenrc file into /etc/skel directory, and home directories of existing users.

0

This was discussed in a Debian bug report: #435715 Remove window resize from 'putty':

The escape code (CSI ? 3 l) sets 80-column mode, forcing a window resize. This is not appropriate for a reset sequence.

which was inconclusive because PuTTY's developers did not participate:

It seems there was nothing from the putty developers so we will keep this terminfo line the same.

The relevant documentation for the reset-strings is in terminfo(5), e.g.,

Most initialization is done with is2. Special terminal modes can be set up without duplicating strings by putting the common sequences in is2 and special cases in is1 and is3.

A set of sequences that does a harder reset from a totally unknown state can be given as rs1, rs2, rf and rs3, analogous to is1, is2, if and is3 respectively. These strings are output by the reset program, which is used when the terminal gets into a wedged state. Commands are normally placed in rs1, rs2 rs3 and rf only if they produce annoying effects on the screen and are not necessary when logging in. For example, the command to set the vt100 into 80-column mode would normally be part of is2, but it causes an annoying glitch of the screen and is not normally needed since the terminal is usually already in 80 column mode.

Because this is a matter of taste rather than an error, and because one of PuTTY's developers chose to use this method for resetting the terminal (and none of the others participated in the subsequent discussion), there was no reason to change the initialization style.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .