Red Hat Bugzilla – Bug 243471
wide window width inconsistency when run by session-manager
Last modified: 2007-12-11 04:48:07 EST
Description of problem:
When an xterm is restarted with saved session parameters to open a wide window,
it seems to have inconsistent state regarding the number of columns, simulating
a "carriage return" when typing in the shell reaches 80 columns, without a "line
feed" so the text writes over the beginning of the same line.
Doing a full reset or running "eval `resize`" does not help, but using the mouse
to change the width of the window seems to correct the problem including
resizing it larger and back to the intended large size.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. open an xterm and resize to be wider than 80 columns
2. save session, logout, and log back in to recreate wide xterm
3. type into shell prompt until characters exceed 80 columns
Text cursor insertion point jumps back to column 0 and overwrites same line
Text keeps filling to right until insertion point hits last column in window,
then resets to column 0 and moves down one line
This happens for me with bash as my login shell and XFCE as my desktop manager,
but I believe it happened with GNOME as well, and I have not tested with
other shells. Attempts to resize/reset from shell and xterm menu fail, leading
me to believe it is internal state of the terminal emulation that is at fault
following the session restore.
This is not a new problem, but I only recently isolated it to the session
restore event. On my laptop with suspend resume, I log out so infrequently that
I had not realized it was happening on every session restore...
There have been several reports in gnu.bash.bug and Debian which
seem to point to a configuration issue with bash rather than the
terminal emulator (a variable that you must set to have SIGWINCH
handled as expected).
Unfortunately I can't reproduce the problem, I've tried xsm, gnome, kde, xfce on
Is the COLUMNS variable set correctly before resize command? Is checkwinsize
option enabled in bash ("shopt checkwinsize" prints the current setting)?
Apologies, I did not realize I was only having the problem with my bash
command-lines and not other programs... you were right and checkwinsize was not
set by default. After setting it, the problem is not apparent with new X
sessions. How odd that it only affects the initial detection of the window
size, as resize events were already being handled.
I see the bug references "xterm-255", and am assuming that
is really "xterm-225". In patch #226 I made an improvement
which might be related to the initial detection of the
window size (see the changelog for handshake and waitForMap).
It would be interesting to revisit this after #226 is packaged.
Ok, xterm-226-1.fc6 has been pushed to update testing. Can you please try it and
see if it makes any difference?
btw, I have fixes already for #227 - see
They're not in this area.
I don't have a FC6 machine to test this on. I have not seen the problem on my F7
or F8 machines, but I now have checkwinsize enabled in my bash profile...
Assuming this was fixed in xterm-226, please reopen if the problem occurs again.