Expect and terminal window resize 
Author Message
 Expect and terminal window resize

Hi,

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?

Thanks
Andy



Mon, 26 Jul 2004 05:16:05 GMT  
 Expect and terminal window resize

Quote:

> Hi,

> 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?

> Thanks
> Andy

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).

Don



Tue, 27 Jul 2004 02:51:43 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. window resize not working as expected

2. Expect Issue with window resize on interactive session

3. Q: resizing listbox with window resize

4. VA3.0b - window resizing on form resize

5. curses and terminal resize

6. Resizing Window in windows

7. C5b: Window formatter resizes window when toolbar is used

8. Using Expect on a screen session telnet'd to a terminal server

9. Expect and terminal problems

10. Expect problems with Linux terminal

11. terminal vs xterm vs emacs and Expect

12. expect - process id in the remote terminal

 

 
Powered by phpBB® Forum Software