From mboxrd@z Thu Jan 1 00:00:00 1970 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes Resent-Date: Thu, 28 Jan 1999 04:40:05 -0500 (EST) Date: Thu, 28 Jan 1999 10:38:30 +0100 From: Drazen Kacar To: Bart Schaefer Cc: Drazen Kacar , zsh-workers@math.gatech.edu Subject: Re: strange xterm & zsh behaviour Message-ID: <19990128103830.A20444@jagor.srce.hr> References: <990127214643.ZM31279@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95i In-Reply-To: <990127214643.ZM31279@candle.brasslantern.com>; from Bart Schaefer on Wed, Jan 27, 1999 at 09:46:43PM -0800 X-Face: 'UIE}WabGB0+U>p-#(hp<_+AD2{H],=qR*jHfm$/e]l0(kU3oOYc5lqG6gg>[\h^IOc{'siD6#!T&loIShgmYHz3#+*D38:|`~\BE,(W~Ol9BDfDwk'lKJ;Z{sY8E9(ME.E]'wvNO`$n#,;9Z`tOFcW/nHZq!BOSrM>V?C<5DTw=<${c{M2V+|)0jSUl&!+8%8nIBF(u:E>SZWM^e X-Attribution: Dave X-Windows: Dissatisfaction guaranteed. Resent-Message-ID: <"te1Yv2.0.mq.r13is"@math> Resent-From: zsh-workers@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Resent-Sender: zsh-workers-request@math.gatech.edu X-Mailing-List: 5076 Bart Schaefer wrote: > On Jan 27, 11:26pm, Drazen Kacar wrote: > } Subject: strange xterm & zsh behaviour > } > } I've noticed that zsh in xterm behaves very strange when I'm in OpenWindows > } or failsafe session. > > It would help to know which version of zsh. 3.0.5? Yes. I'm sorry I didn't include more details. I started writing complaint about xterm on comp.unix.solaris and then I checked ksh, just to see how it fails in the same way. But it didn't, so I checked the rest of the shells and then had to send a copy to zsh the mailing list. I was too much surprised to think. Here are the details (some of which are not needed): I'm using a box which has "Ultra 1 creator" written on it, with Solaris 7 in 64-bit environment. It's freshly installed and software that's not from Sun's CDs is either compiled by me or by one of my co-workers. We use Debian packaging system and run-away config files are out of the question. This also means that all of our packages are compiled on Solaris 2.6 in 32-bit environment. However, I've seen the same problem on Solaris 2.6 on consoles and some terribly old Sun's X terminals. I don't know what exactly runs on those terminals, but I'm pretty sure it all comes from Sun. Since I'm trying to bring this station into usable state (that is, get rid of the CDE), I'm currently in a failsafe session which gives me one dtterm (/usr/dt/bin/dtterm). All reports are about xterm (/usr/openwin/bin/xterm) started from the first dtterm. > } Control keys and arrow keys don't work any > } more. The shell just echos ^[[A (for example) instead of scrolling > } through the history list. Ctrl-C is being echoed as ^C and the shell > } doesn't prompt in a new line. > > Sounds like something has stomped on the tty driver settings. Yes, just like I was on a teletype. When I press ctrl-C, the only visible effect is echoing "^C" in the same line. However, the shell cancels the command, since pressing enter produces only a prompt in the next line, regardless of what I previously typed in. > What do you see if you give the "stty -a" command? These are with Sun's stty. I currently don't have GNU stty, but I can install it if need be. iispeed 89376 baud; ospeed 89360 baud; rows = 24; columns = 80; ypixels = 364; xpixels = 724; eucw 1:0:0:0, scrw 1:0:0:0 intr = ^c; quit = ^\; erase = ^h; kill = ^u; eof = ^d; eol = ; eol2 = ; swtch = ; start = ^q; stop = ^s; susp = ^z; dsusp = ^y; rprnt = ^r; flush = ^o; werase = ^w; lnext = ^v; -parenb parodd cs8 cstopb hupcl cread -clocal loblk crtscts crtsxoff parext -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl -iuclc ixon -ixany ixoff -imaxbel isig icanon -xcase echo echoe echok -echonl noflsh -tostop echoctl -echoprt echoke -defecho -flusho -pendin iexten opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel tab3 Dtterm has the same values, except for pixel values and erase character :-) > Is the value of $TERM the correct one? Set to "vt100" in $HOME/.zshrc. This is an ugly habbit which has something to do with people who like to define horrors like "xterm-debian" and the like. Setting TERM to "xterm" doesn't change anything. Vi is usually good at bringing terminals to the sane state, but not in this case. > Sun OSs have a nasty habit of copying the console tty settings to all > newly opened psuedo-tty devices, which is what xterm uses for I/O. In > the X11R6 xterm there's even a resource, XTerm*ttyModes, added just to > address this issue. And something decided I need it. xrdb -query reports (among lots of trash): *ttyModes: erase ^H intr ^C kill ^U start ^Q stop ^S swtch ^@ susp ^Z Setting swtch to ^@ doesn't change anything. /usr/dt/app-defaults/C/Dtterm contains only cosmetics. The same is with /usr/openwin/lib/app-defaults/XTerm. > Or an appropriate stty command in an init file; ksh, bash, and tcsh may > even already have such commands in /etc/profile or /etc/cshrc or whatever. grep stty **/*(.) in /etc and /usr/dt/config doesn't produce a thing (except stty -istrip somewhere in /etc/skel.orig, but I think this isn't executed). Neither does "**/.*(.)". The only global config file is /etc/profile. Csh doesn't have global config (according to the man page). Other shells do, but the files do not exist on my system. There are .* init files in my home directory (created by useradd -m), but none of them contains interesting stuff. A friend of mine kind of solved the problem 4-5 months ago. Rxvt (the latest and greatest at the time) behaved just like xterm. When I asked him about his solution he couldn't remember the exact procedure, so I got something like "There is a fallback code for terminal settings in rxvt in case those weren't set by the system. I just removed the if clause and told it to always set them." Don't ask about details. Your guess is as good as mine. I remember I was trying to copy terminal settings from patched rxvt to xterm (using both Sun's and GNU stty), but to no avail. That's about it. Further quetions? -- .-. .-. Life is a sexually transmitted disease. (_ \ / _) | dave@srce.hr | dave@fly.cc.fer.hr