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

Re: Help with Expect & Xterm



On Wednesday 13 February 2002  6:09 pm, Cameron Kerr wrote:
> You can't use expect to interact with X stuff, only terminal stuff. So you
> can control the shell _inside_ the terminal, but not an xterm. Therefore,
> you should start your expect script inside a new xterm
>
> xterm -e myexpectscript
>
> Where your expect script would spawn telnet.

Well, that doesn't seem to work either.

My script now is:

spawn telnet <ip here>
sleep 5
send "login <name here>"
sleep 5
send "<pass here>"


I used xterm -e <scriptname> to start xterm, and I do see it runs the script, 
but I'm still not seeing anythng.

Maybe I'm taking the wrong approach.

What I want to do is:

1) start up three xterms
2) In each xterm
	* start a telnet session to another machine
	* auto login w/ password
	* continue to use each session as if I did this all manually.

Starting up three xterms isn't a problem, but automating the logins is..



Reply to: