Expect and terminal window resize
> I've discovered Expect to solve a problem I have. I want to rlogin
> into a unix servers and send a few commands to set up my TERM and
> DISPLAY on connection. My script is based on the xrlogin
> example and seemed an excelent soloution however I have
> just discovered a problem.
> I'm using Solaris 8, CDE and a dtterm. If I use an expect script
> to rlogin to another server then resize my terminal window the
> info isn't passed to my session so vi etc has the wrong window
> size ( stty rows doesn't change ).
> If I do a normal rlogin it works fine. Anybody know of a work around?
That's because rlogin catches WINCH (the window change signal). You
can do the same thing with Expect using the trap command. There are
some good examples of it in the book (I don't remember offhand if
they're also in the examples that come with Expect).