Centos 5.8 and RedHat 5.3 terminals strange behaviour
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Centos 5.8 and RedHat 5.3 terminals strange behaviour
Hello,
I have following problem. I have Centos 5.8 ( Final ) on Virtual Box.
I noticed very strange behavior of the terminals when resizing them.
My default shell is tcsh .
Let's assume that we have trial script try.csh with text in it:
#! /bin/tcsh -f
# Trial script
echo -n "Enter some value: "
set tmp = $<
if (${tmp} == "") then
echo "Only key [Enter] is typed"
else
echo "The entered value = ${tmp} "
endif
exit 0
If I execute the command ./try.csh
First following text appears: Enter some value:
If now I resize the terminal nothing happens, which should be the case.
But if I execute the command source ./try.csh
First same text appears: Enter some value:
And now if I again change the size of the terminal the text is changed to: Enter some value: Only key [Enter] is typed
So it seems that sourced program considers resizing of the terminal like as [ Enter ] key is typed. In the company where I work we have RedHat5.3 servers and RedHat4.7 server, on the RH5.3 this problem is also existing, which is not the case for RH4.7 ones.
I don't use either of the distro's you're mentioning, and I don't use tsch (bleagh ;}).
But I note that tcsh on Slackware64 13.37 shows the exact opposite of the behaviour you
describe (works when sourced, fails when run), and debian squeeze 64 behaves as expected
in both cases (resizing doesn't "answer" the prompt).
I can only assume that the difference lies in the way the terminal emulation in used is
set-up to respond to sizing events, and that it may differ between distros and versions
of distros.
It seems that the issue is not caused from the terminal emulator itself.
Because in Centos5.8 I have this issue using Terminal, konsole and xterm.
In RedHat5.3 I have the issue using konsole, xterm and gnome-terminal.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.