in reply to How do I emulate a VT100 terminal to interact with a remote GUI

See Expect. The Expect programming language (and the perl Expect module that provides that functionality to Perl users) are designed percisely for doing what you want: interacting with console and command-line processes like it was a user at a keyboard.
  • Comment on Re: How do I emulate a VT100 terminal to interact with a remote GUI