zsh-workers
 help / color / mirror / code / Atom feed
From: Drazen Kacar <dave@srce.hr>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Drazen Kacar <Drazen.Kacar@public.srce.hr>, zsh-workers@math.gatech.edu
Subject: Re: strange xterm  & zsh behaviour
Date: Thu, 28 Jan 1999 10:38:30 +0100	[thread overview]
Message-ID: <19990128103830.A20444@jagor.srce.hr> (raw)
In-Reply-To: <990127214643.ZM31279@candle.brasslantern.com>; from Bart Schaefer on Wed, Jan 27, 1999 at 09:46:43PM -0800

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 = <undef>; eol2 = <undef>; swtch = <undef>;
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



  reply	other threads:[~1999-01-28  9:38 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-27 22:26 Drazen Kacar
1999-01-28  5:46 ` Bart Schaefer
1999-01-28  9:38   ` Drazen Kacar [this message]
1999-01-29  3:47     ` Drazen Kacar
1999-01-29  9:16       ` PATCH: 3.1.5* & 3.0.5: " Peter Stephenson
1999-01-29 18:59         ` PATCH: (more) " Bart Schaefer
1999-01-29 19:08           ` Bart Schaefer
1999-01-30  5:54           ` Drazen Kacar
1999-01-30 12:43             ` Peter Stephenson
1999-01-30 12:51               ` Peter Stephenson
1999-01-30 18:04                 ` Bart Schaefer
1999-01-30 18:27                   ` Drazen Kacar
1999-01-30 20:41                     ` Terminal initialization and (non-)interactive shells Bart Schaefer
1999-02-01  0:50                       ` Drazen Kacar
1999-02-01  1:24                         ` Bart Schaefer
1999-02-03 11:08                   ` PATCH: 3.1.5-pws-6: ttys revisited Peter Stephenson
1999-01-30 13:29               ` PATCH: (more) Re: PATCH: 3.1.5* & 3.0.5: Re: strange xterm & zsh behaviour Drazen Kacar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19990128103830.A20444@jagor.srce.hr \
    --to=dave@srce.hr \
    --cc=Drazen.Kacar@public.srce.hr \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).