GNU screen doesn't report correct terminal size with hardstatus until resized

Bug #731720 reported by Miles Strombach
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
screen (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: screen

$ lsb_release -rd; echo; apt-cache policy screen; echo; screen --version
Description: Ubuntu 10.10
Release: 10.10

screen:
  Installed: 4.0.3-14ubuntu4
  Candidate: 4.0.3-14ubuntu4
  Version table:
 *** 4.0.3-14ubuntu4 0
        500 http://us.archive.ubuntu.com/ubuntu/ maverick/main i386 Packages
        100 /var/lib/dpkg/status

Screen version 4.00.03jw4 (FAU) 2-May-06

When the hardstatus line is enabled in screen, the 'unusable' line is not deducted from the environment ($LINES, stty -a) until the window is resized. I can reproduce this in xterm and sakura (which uses the same terminal emulation lib, VTE, as gnome-terminal). It doesn't matter is the terminal is resized before screen is started. There are no termcapinfo lines in my .screenrc. My hardstatus line is:

hardstatus alwayslastline '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %m/%d %{W}%c %{g}]'

Example:

Before resize, no screen:
$ echo $LINES; stty -a
24
speed 38400 baud; rows 24; columns 80; line = 0;
(...)

Before resize with screen:
$ echo $LINES; stty -a
24
speed 38400 baud; rows 24; columns 80; line = 0;
(...)
(in screen) CTRL-A i -> ...(80,23)...

After resize (maximize), with screen:
$ echo $LINES; stty -a
68
speed 38400 baud; rows 68; columns 182; line = 0;
(...)
(in screen) CTRL-A i -> ...(182,68)...

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: screen 4.0.3-14ubuntu4
ProcVersionSignature: Ubuntu 2.6.35-27.48-generic 2.6.35.11
Uname: Linux 2.6.35-27-generic i686
NonfreeKernelModules: fglrx
Architecture: i386
Date: Tue Mar 8 19:18:47 2011
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release i386 (20101007)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: screen

Revision history for this message
Miles Strombach (mstromb) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in screen (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.