[comp.unix.sysv386] vi and rlogin

jim@tiamat.fsc.com ( IT Manager) (06/05/91)

I remember seeing something about this once, so I checked the FAQ and
it wasn't there, so I'll ask again.

When using "vi" under SCO Unix (or Xenix) after making a "rlogin"
connection (i.e. the SCO box is the remote machine), using the arrow
keys is a pain.  I know that running "stty min 3 time 10" helps
make the problem go away, but I can't figure out how to get "vi" to
honor the changes.

Any suggestions?
------------- 
James B. O'Connor			jim@tiamat.fsc.com
Ahlstrom Filtration, Inc.		615/821-4022 x. 651

jrh@mustang.dell.com (Randy Howard) (06/05/91)

In article <852@tiamat.fsc.com>, jim@tiamat.fsc.com ( IT Manager) writes:
|> I remember seeing something about this once, so I checked the FAQ and
|> it wasn't there, so I'll ask again.
|> 
|> When using "vi" under SCO Unix (or Xenix) after making a "rlogin"
|> connection (i.e. the SCO box is the remote machine), using the arrow
|> keys is a pain.  I know that running "stty min 3 time 10" helps
|> make the problem go away, but I can't figure out how to get "vi" to
|> honor the changes.
|> 
|> Any suggestions?

If this is the problem I am thinking of, 'set notimeout' will help most of
the time.  Especially for vt100 emulation.

-- 
Randy Howard                        !'s:uunet!dell!mustang!jrh  
Dell Computer Corp.                 @'s:jrh@mustang.dell.com

rharmon@srg (Robert B. Harmon x4964) (06/06/91)

In article <852@tiamat.fsc.com> jim@tiamat.fsc.com ( IT Manager) writes:
>>
>>  I remember seeing something about this once, so I checked the FAQ and
>>  it wasn't there, so I'll ask again.
>>
>>  When using "vi" under SCO Unix (or Xenix) after making a "rlogin"
>>  connection (i.e. the SCO box is the remote machine), using the arrow
>>  keys is a pain.  I know that running "stty min 3 time 10" helps
>>  make the problem go away, but I can't figure out how to get "vi" to
>>  honor the changes.

I believe rlogin eats ESCs so arrow keys (instead of klhj) will not
work.

The telnet command implements a virtual terminal protocol and 
arrow keys will work.

Perhaps this should be a FAQ is probably is already somewhere.

:) :) Of course emacs doesn't have this problem :) :)
--
rharmon@srg.UUCP              |
Bob Harmon @ Arinc Research   |
Riva Rd, Annapolis            | Disclaimer:
301-266-4964                  | Any opinions expressed aren't mine

cpcahil@virtech.uucp (Conor P. Cahill) (06/07/91)

rharmon@srg (Robert B. Harmon x4964) writes:

>I believe rlogin eats ESCs so arrow keys (instead of klhj) will not
>work.

Rlogin does not eat ESCs.  The problem with using multi-byte keys over
a network is that there may be enough of a delay between the characters
in the sequence that a program sees them as separate sequences.

>The telnet command implements a virtual terminal protocol and 
>arrow keys will work.

There should be NO difference (with respect to multi-byte keys)
between rlogin and telnet.

-- 
Conor P. Cahill            (703)430-9247        Virtual Technologies, Inc.
uunet!virtech!cpcahil                           46030 Manekin Plaza, Suite 160
                                                Sterling, VA 22170 

jim@tiamat.fsc.com ( IT Manager) (06/07/91)

In article <RHARMON.91Jun6093442@triton.srg>, rharmon@srg (Robert B. Harmon x4964) writes:
> 
> I believe rlogin eats ESCs so arrow keys (instead of klhj) will not
> work.
> 
> The telnet command implements a virtual terminal protocol and 
> arrow keys will work.

I received the suggestion to use

:set notimeout

in vi, and sure enough, it works just great (although I do have to hit ESC
twice sometimes to get out of INPUT MODE, but that's a small trade off for
being able to use my arrows keys with rlogin).

> Perhaps this should be a FAQ is probably is already somewhere.
> In article <852@tiamat.fsc.com> jim@tiamat.fsc.com ( IT Manager) writes:
> >>
> >>  I remember seeing something about this once, so I checked the FAQ and
> >>  it wasn't there, so I'll ask again.
> >>
> 
> :) :) Of course emacs doesn't have this problem :) :)

One of these days I'll probably install emacs, but I'm still reluctant
to have more than one OS on a machine at a time. :-)

------------- 
James B. O'Connor			jim@tiamat.fsc.com
Ahlstrom Filtration, Inc.		615/821-4022 x. 651

timr@sco.COM (Tim Ruckle) (06/08/91)

In article <852@tiamat.fsc.com> jim@tiamat.fsc.com ( IT Manager) writes:
} When using "vi" under SCO Unix (or Xenix) after making a "rlogin"
} connection (i.e. the SCO box is the remote machine), using the arrow
} keys is a pain.  I know that running "stty min 3 time 10" helps
} make the problem go away, but I can't figure out how to get "vi" to
} honor the changes.

This is a known problem, and the easiest work-around is to use telnet
instead of rlogin.

The issue is resolved in SCO TCP/IP version 1.1.3 (for SCO UNIX) which
is now shipping, and in SCO TCP/IP version 1.2.0 (for SCO XENIX) which
is soon to be released.

The problem is that rlogin sends the characters one packet at a time,
and the arrow keys are actually sending a series of characters.  The
way vi tells whether you've hit the arrow key or typed in those
characters separately is by how fast they come in--since they're coming
in one per packet there can be problems with the timing.

-timr
-- 
Usenet: !{uunet,ucbvax!ucscc,decvax!microsof}!sco!timr, ...!mcsun!ukc!scol!timr
Internet: [MX handlers]  timr@sco.COM     [others]  timr%sco.COM@ucscc.UCSC.EDU
USPS: Santa Cruz Operation, 400 Encinal St.,P.O. Box 1900, Santa Cruz, CA 95061
PSDN: [voice] (408) 425-7222  [fax] (408) 458-4227  [twx] 910-598-4510 SCO SACZ

chrisdu@sco.COM (Chris Durham) (06/08/91)

In article <17523@scorn.sco.COM> timr@sco.COM (Tim Ruckle) writes:
:
:In article <852@tiamat.fsc.com> jim@tiamat.fsc.com ( IT Manager) writes:
:} When using "vi" under SCO Unix (or Xenix) after making a "rlogin"
:>} connection (i.e. the SCO box is the remote machine), using the arrow
:>} keys is a pain.  I know that running "stty min 3 time 10" helps
:>} make the problem go away, but I can't figure out how to get "vi" to
:>} honor the changes.
:>
:>This is a known problem, and the easiest work-around is to use telnet
:>instead of rlogin.
:>


You can also use:

:set notimeout

in vi or in your .exrc


-- 
chris durham					chrisdu@sco.COM
Technical Support				...!{uunet,ucscc}!sco!chrisdu
The Santa Cruz Operation			

"'cause you either live life, bruises, skinned knees and all, or you
turn your back on it and start dying.

			-Captain Christopher Pike, _Star Trek_ "The Cage"

sef@kithrup.COM (Sean Eric Fagan) (06/08/91)

In article <1991Jun07.012603.4449@virtech.uucp> cpcahil@virtech.uucp (Conor P. Cahill) writes:
>Rlogin does not eat ESCs.  The problem with using multi-byte keys over
>a network is that there may be enough of a delay between the characters
>in the sequence that a program sees them as separate sequences.

No, I guarantee there is at least one version of rlogin that SCO shipped
that ate ESC's.  A friend of mine fixed it, after finding out, during one
session (in which he'd rlogin'd to one machine, and rlogin'd from there to a
third, and then ran emacs on the third) that he had to press <esc> *27 times* 
to get one across.  (Each rlogin [not rlogind] ate three escapes, and spit out 
one in return; thus, 3 esc's on localhost to get one esc to host1; 9 esc's on 
localhost to get three esc's to host1 to get 1 esc to host2; and 27 esc's 
on localhost to get 9 esc's to host1 to get 3 esc's to host2 to get 1 esc 
to host3.)

There may be a problem with function keys over the network, but emacs
doesn't *care* about that, so there aren't any timing problems.

-- 
Sean Eric Fagan  | "I made the universe, but please don't blame me for it;
sef@kithrup.COM  |  I had a bellyache at the time."
-----------------+           -- The Turtle (Stephen King, _It_)
Any opinions expressed are my own, and generally unpopular with others.

koe@kivax.UUCP (Diana Koehler) (06/12/91)

jim@tiamat.fsc.com ( IT Manager) writes:

>I remember seeing something about this once, so I checked the FAQ and
>it wasn't there, so I'll ask again.

>When using "vi" under SCO Unix (or Xenix) after making a "rlogin"
>connection (i.e. the SCO box is the remote machine), using the arrow
>keys is a pain.  I know that running "stty min 3 time 10" helps
>make the problem go away, but I can't figure out how to get "vi" to
>honor the changes.

Within vi or within .exrc or .vimakros you have to set:

             set notimeout

Then the arrow keys work.

Diana

------------------------------------------------------------------------

Diana Koehler                     Tel.:   +49 7721 867034
Digital Kienzle Computersysteme
Abt. 011.2                        e-mail: koe@kivax.UUCP
Postfach 1660                             ..!mcsun!unido!kivax!koe
D-7730 VS-Villingen                       ..!uunet!unido!kivax!koe