cooked mode sessions

Howard Chu hyc at symas.com
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
>
> http://groups.google.com/group/gnu.bash.bug/browse_thread/thread/a34500e79021003b#
>
>> 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://github.com/hyc/OpenSSH-LINEMODE.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 
clients.

-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/


More information about the openssh-unix-dev mailing list