I would like to force GNU screen to reflow to the existing terminal width when I reattach a session. It seems to me this worked properly before I upgraded a machine to CentOS 6, but I cannot figure out how to restore it. (TERM=xterm
)
Whenever I reattach a session, regardless of state when I detached it, it launches at 80 columns, resizing my terminal (PuTTY, in this case) along with it.
I'm launching & reattaching with:
screen -aA -R <session>
My .screenrc contains only the following, and a few irrelevant key bindings:
term xterm
defscrollback 10000
# status line at the bottom
hardstatus on
hardstatus alwayslastline
hardstatus string "${-}%{.0c}%-w%{.y0}%f%n %t%{-}%+w %=%{..G}[%H] %{..Y} %D %M %d, %Y %c | Load: %l"
caption splitonly "%{.yK}%3n t"
caption string "%{.c0}%3n %t"
vbell off
# Fix fullscreen programs
altscreen on
tmux
, I can dynamically resize my Terminal window and the tmux inside will follow.