Have you noticed that starting or reattaching to a screen session causes all your SecureCRT tabs to resize to 80 columns? There’s a straightforward fix for this. First, identify the terminal type you’re using, which should be done outside of screen; otherwise, it defaults to ‘screen’.
[kroko@server ~]$ echo $TERM
xterm-256color
Next, add the following line to your ~/.screenrc file, modifying it according to your terminal type as necessary:
termcapinfo xterm-256color* 'is=\E[r\E[2J\E[H\E[?7h\E[?1;4;6l'With this configuration, your terminal will maintain the width of your SecureCRT window, no matter the session.
The settings explained:
‘is=…’: This is the initialization string that gets sent to the terminal. It consists of several terminal control codes:
\E[r: Resets the scrolling region of the terminal to its default.
\E[2J: Clears the entire screen.
\E[H: Moves the cursor to the home position (top left).
\E[?7h: Ensures that line wrapping is on.
\E[?1;4;6l: Resets several terminal modes:
?1l: Exits cursor key application mode.
?4l: Turns off smooth (slow) scroll.
?6l: Exits origin mode (cursor addressing relative to the screen).