Resize A Konsole Window

Question: 

Is it a bug that when I resize a konsole window, apparently some applications (bash especially) do not realize that they now live in a different world? 

In the bash tab during the window resize, everything is fine. It is in the other bash tabs that I get weird line-end results. 

Ans:

I was just reading about this this morning.

Bash isn't using the full width of the terminal after I resize it

When you resize a terminal, it sends a SIGWINCH signal to the process running inside it. If the current foreground process is not bash(1), but another process (eg less(1), tail(1), or whatever), then only that process receives the signal. The shell is then left with outdated size information.

The best way to fix this is to set the checkwinsize shell option:

shopt -s checkwinsize

Bash will now check the size every time it displays a prompt. Other shells (such as zsh(1)) seem to do this automatically, and don't have a corresponding option.

A one-off workaround is to send SIGWINCH to the shell yourself:

kill -WINCH $$

($$ is a variable containing the shell's own PID.)

__EOF__

Therefore only one bash instance (in your case) is receiving the SIGWINCH signal.

Have a Unix Problem
Unix Forum - Do you have a UNIX Question?

Unix Books :-
UNIX Programming, Certification, System Administration, Performance Tuning Reference Books

Return to : - Unix System Administration Hints and Tips

(c) www.gotothings.com All material on this site is Copyright.
Every effort is made to ensure the content integrity.  Information used on this site is at your own risk.
All product names are trademarks of their respective companies.
The site www.gotothings.com is in no way affiliated with or endorsed by any company listed at this site.
Any unauthorised copying or mirroring is prohibited.