cooked mode sessions

Howard Chu hyc at
Wed Jun 16 17:33:42 EST 2010

Howard Chu wrote:
> Howard Chu wrote:
>> So far this is only working as expected for dumb programs that don't try to
>> manipulate the tty modes. I'm working on some patches to the readline library
>> so that it will leave the tty in cooked mode if it detects that EXTPROC is set
>> on the tty. So a remote bash shell will defer all input processing to the
>> local client. Will also be able to support command completion, if the tty
>> session has VEOL set to<TAB>.
> Simple patch for bash/readline here
>> Right now the tty mode handling on the client is a mess, it will need to be
>> rationalized somehow to work cleanly with older raw-mode-only servers along
>> with the linemode servers.
>> Feedback and help would be greatly welcomed.
> If anyone is interested, you can just follow along on this repo:
> git://
> Everything should work exactly as before when connecting to an unpatached
> server. With a patched server and patched shell you'll have local editing plus
> command history. I'm still working out how to pass-thru the command completion
> bits.
Ugh. Except that this only works well for a single client; if you mux another 
session in everything breaks. The GNU readline library assumes it's only 
working with one display in one process; it doesn't work well trying to mux it 
across multiple ttys. Is there a particular reason why the muxing code didn't 
just relay the session data from the master to the slave client, rather than 
passing file descriptors to the master and having it write directly to the 
slave's tty? I guess it saves on memory copies, but it also limits the other 

   -- Howard Chu
   CTO, Symas Corp. 
   Director, Highland Sun
   Chief Architect, OpenLDAP

More information about the openssh-unix-dev mailing list