[plug] Gnome Terminal (Bash) Resize problem
Tim White
weirdo at tigris.org
Mon Oct 11 14:19:43 WST 2004
James Devenish wrote:
>In article <4167745A.4030805 at tigris.org>, Tim White wrote:
>
>
>>If I resize my gnome terminal while I'm running something (i.e. man) it
>>doesn't update the $COLUMNS and $LINES environment variables causing
>>bash to stuff up long commands (wrapping the back to the start at the
>>correct place according to $COLUMNS but not starting a new line)
>>
>Note that $COLUMNS and $LINES are not 'intrinsic' to any programme --
>they are provided optionally. Shells like Bash set up COLUMNS and LINES
>and update them when triggered (e.g. via SIGWINCH or via a callback or
>when you press 'enter'). Presumably, Bash is not updating its variables
>because the foreground process (e.g. man) is absorbing the WINCH signal.
>However, it does seem odd that it doesn't just update its variables when
>the child process exits. Do you have "job control" enabled or disabled?
>
>
Not sure where this would be.
>What version of Bash are you using? Do you have the same problem using
>xterm? (I don't have this problem with any attempted combination of zsh
>4.0.4, bash 2.05a.0(1)-release, screen 4.00.02 or gnome-terminal 1.4.0.6
>from Debian woody.)
>
>
I am running gnome-terminal 2.6.1-6, xterm 4.3.0-0pre1v5, bash 2.05b-12.
I can recreate it in an xterm and gnome-terminal. It doesn't happen with
csh but I don't have zsh to try.
Try this
1. Start the terminal
2. #echo $LINES; echo $COLUMNS
3. man man
4. resize term (maximise with man still running)
5. #echo $LINES; echo $COLUMNS
6. type a long command line longer than the $COLUMNS was. spaces are
allowed. You should see it wrap around at the $COLUMNS position
but not go down to a new line. (Try holding down a letter if you
can't be bothered writing a long line. Or write out a nice long
apt-cache show .......)
7. You can then restore maximise and do the same
8. #echo $LINES; echo $COLUMNS
9. man man
10. resize term (restore to normal size with man still running)
11. #echo $LINES; echo $COLUMNS
12. type a long (longer than last time) line. You should see it wraps
at the edges and then every few lines it wraps to the start of the
line again. This time it is a good idea to write out the alphabet.
You can see the first 6 moves below. It started wrapping after the @
------
tim at linmedia:~$ echo $LINES; echo $COLUMNS
24
80
tim at linmedia:~$ man man
tim at linmedia:~$ echo $LINES; echo $COLUMNS
24
80
#$%^&*()_+ia:~$
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRTUVWXYZ1234567890~!@
------
Tim
p.s. look at the above in fixed width font to see that the ia:~$ after
the + is the last of the bash prompt not yet over written.
More information about the plug
mailing list