On Fri, Jul 20, 2001 at 03:14:34AM +0000, Geoff Wing wrote:
> Chris Green <[EMAIL PROTECTED]> typed:
> : I'm trying to automate something by using "rxvt -e <command>" and,
> : for some reason it's failing.
> : If I issue <command> from the prompt after starting rxvt it works
> : fine, however when I do "rxvt -e <command>" the first part of what
> : command does works OK (well the text appears) but the second part
> : doesn't, it just makes rxvt exit.
> 
> OK, this is very vague.  Can you provide more information about what
> your command does?
>  
> : I'm using ioctl(fd, TIOCSTI, cp) to stuff characters into the
> : keyboard buffer in <command>, can anyone suggest any reason why this
> : might not work with "rxvt -e <command>"?
> 
> You've isolated the problem to that call?  What error is it giving? 
> 
I have a short 'C' program which automates login via telnet to a
remote system.  I.e. the 'C' program uses ioctl(fd, TIOCSTI, cp) to
stuff the following into the keyboard buffer:-

    "telnet -l chris <name of system>\n"

It then sleeps for a few seconds and stuffs the password for the
remote system into the keyboard buffer.

When I execute the above program from the command line in an rxvt
window it works.  When I run it using "rxvt -e <command>" it fails.
There's no error message, the "telnet -l chris <name of system>"
appears in the new rxvt window and then, after a while, the window
just exits.

-- 
Chris Green ([EMAIL PROTECTED])
  Home: [EMAIL PROTECTED]                 Work: [EMAIL PROTECTED]
  WWW: http://www.isbd.co.uk/

Reply via email to