Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 32182

Summary: xterm started in ratpoison sometimes tells other applications he's only got 24 lines
Product: Gentoo Linux Reporter: Artem Baguinski <artm>
Component: Current packagesAssignee: Jason Wever (RETIRED) <weeve>
Status: RESOLVED UPSTREAM    
Severity: minor    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Artem Baguinski 2003-10-28 02:58:27 UTC
the weird thing though - it only happens sometimes. the programs using (n)curses
- vim, less are affected, while bash only gets confused after i used one of those.

Reproducible: Sometimes
Steps to Reproduce:
1. start ratpoison, then xterm (e.g. 'C-t c' or 'C-t :xterm<RETURN>')
2. man less

Actual Results:  
man page is 24 lines high

Expected Results:  
man page should be as high as a terminal window

it only happens sometimes and only on one of my computers - the one which i've
set up the last. most of the system is from binary packages from livecd of
gentoo-1.4-r4, except for ratpoison and ncurses.

work around: change xterm font size up and down (i have ctrl-F1 ctrl-ESC setup
for that, i don't remember the defaults (and i don't have key pad to find them
with trieal and error ;)

here's emerge info:

Portage 2.0.49-r4 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1, 2.4.20-gentoo-r6)
=================================================================
System uname: 2.4.20-gentoo-r6 i686 Pentium III (Coppermine)
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=pentium3 -fprefetch-loop-arrays -funroll-loops -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /var/qmail/control /usr/share/config
/usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O3 -march=pentium3 -fprefetch-loop-arrays -funroll-loops -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs sandbox ccache buildpkg"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="ruby perl esd gtk ldap x86 oss apm acpi cjk cscope directfb -arts avi
-berkdb -crypt cups encode -foomaticdb -gdbm gif -gpm gtk2 imlib -java jpeg -kde
-gnome -libg++ -libwww mad mikmod mmx -motif mpeg ncurses nls oggvorbis opengl
pam pdflib png python -qt quicktime readline sdl slang -spell -ssl svga -tcpd
truetype X -xml2 -xmms xv zlib"
Comment 1 Jason Wever (RETIRED) gentoo-dev 2003-10-31 17:32:30 UTC
What version of ratpoison are you using?  1.2.2-r1?
Comment 2 Artem Baguinski 2003-11-01 09:32:27 UTC
not even -r1, 1.2.2
will installing 1.3.0_beta3-r1 help? i'll try now but i've got dialup internet
and damn slow laptop, don't expect the results too soon ;)
Comment 3 Artem Baguinski 2003-11-01 09:41:46 UTC
installed 1.3.0_beta3-r1, bug seems to be gone (but i can't be sure for it
wasn't reliable and consistent bug like those in the old days:)
Comment 4 Artem Baguinski 2003-11-01 09:43:48 UTC
oops, right after i reported that bug's gone it's back. just like i said
- it's not always the case...
Comment 5 Jason Wever (RETIRED) gentoo-dev 2003-11-23 08:13:02 UTC
Sorry for the lack of response, been rather busy lately.

A couple things i've noticed with this.

1) This only happens for me with the initial xterm.  Additional xterms do not seem to have this problem.
2) In the xterm, if you run the reziae command, it seems to fix this problem.
3) If you have a .ratpoisonrc file, this problem doesn't seem to happen.

Is this the same for you?
Comment 6 Darian Rackham 2003-11-26 14:25:03 UTC
I haven't seen this longstanding bug since updating to ratpoison-1.3.0_rc1.  I think the bug was with an xterm that was opened immediately after a program that was not also an xterm.  In case it comes back, the ratpoison "redisplay" command, which is normally bound to C-t l and C-t C-l, is the workaround suggested in the info page.
Comment 7 Darian Rackham 2003-11-27 22:22:11 UTC
Ok, the bug's still there.  I found a thread on freshmeat where the author
attributes the bug to a race condition in xterm.  I guess it's a race between
the xterm processing the maximize command from ratpoison and setting the
COLUMNS and LINES environment variables in the shell to the default 80x24.

The comment I'm referring to is at
http://freshmeat.net/projects/ratpoison/?topic_id=56
Comment 8 Artem Baguinski 2003-12-04 02:55:00 UTC
workaround:

1. start ratpoison
2. start xterm (e.g. "^T c")
3. issue redisplay command (e.g. "^T l")
4. issue the following in xterm: "echo "XTerm*geometry: ${COLUMNS}x${LINES}" >> ~/.Xresources" 

of course the .Xresources should be loaded ("xrdb -merge ~/.Xresources") on X startup but most people have that bit setup. i do for example, although i can't find where - must be default behaviour of gentoo's xinit. 
Comment 9 Jason Wever (RETIRED) gentoo-dev 2003-12-25 16:43:07 UTC
As this is not a Gentoo bug, I'm marking it as resolved:upstream (meaning it's a software vendor's problem).