[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bash / readline should support EXTPROC / LINEMODE

From: Howard Chu
Subject: bash / readline should support EXTPROC / LINEMODE
Date: Tue, 15 Jun 2010 00:12:59 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; rv:1.9.3a5pre) Gecko/20100607 Firefox 3.6

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I../bash -I../bash/include -I../bash/lib -g -O2 -Wall uname output: Linux violino 2.6.34-5-generic #14~lucid1-Ubuntu SMP Thu Jun 3 14:51:20 UTC 2010 x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

Bash Version: 4.1
Patch Level: 5
Release Status: release

bash / readline currently forces terminals into character-at-a-time operation. This is unfriendly for users on slow networks or networks with high per-byte fees. Since 1989 there has been an approach called LINEMODE for clients to interact with remote servers while still handling all line editing and character processing locally. (See RFC1116 and RFC1184.) But this feature is rendered useless when such ubiquitous software as bash and readline force character-at-a-time processing.

Try to connect to your favorite server using a cellphone network connection. Aside from the terrible input lag, if you do this while roaming you'll run up a nasty bill at the same time. If you happen to have an up to date Telnet client and a BSD server, you'll notice that input responsiveness is a lot better, as long as you use a "dumb" shell. You can't repeat this experiment on current Linux systems because the Linux kernel never adopted the tty driver feature needed to support it.

The attached patch will make readline check for the EXTPROC tty mode and bypass most of its I/O processing features if EXTPROC is detected. (Input prompt handling must still be done.)

Patches for the Linux kernel to support the EXTPROC features are available here

    Patches to get Telnet working with the Linux support are available here

    Preliminary patches to get OpenSSH working with linemode are available here

Note that these OpenSSH patches were a very rough cut. I'll be posting an updated patch shortly that also supports command history. In the meantime I'm working on further readline patches to support command completion between the client and the server. (And no one will be more surprised than me if that actually works...)

This combination of patches is giving me pretty reasonable terminal behavior now, but obviously a lot of it is rough. Feedback appreciated.
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/

Attachment: rldif.txt
Description: Text document

reply via email to

[Prev in Thread] Current Thread [Next in Thread]