hi monks,

i've built a script for logging into several routers from a xterm for each session.
for interactivity, i used Expect.pm, which works but its not fast as pure telnet connection.
anyway, its the only way for user interactiion i've found.

basic function:
i have one xterm as mainwindow which reads the hostname and starts another xterm that starts the telnet session to the router.
actually, the user and password handling is made over sockets.
mainwindow acts as a tcp server and starts a 'xterm -e telnet.pl <randomseed> <randomport>' as a tcp client.
once started, it connects to the server which sends the routerlogin and password client (telnet.pl) an all works as intended.

but i dont like the way the login data is handled, because:
- network connections on the same host as client/server isn't really a useful way
- it's not multiuser compatible
what i want (and tried, useless):
- fork a child for each routerconnection with bi-directional pipe for handling auth. data
- have an new xterm for each connection for STDIN/STDOUT.

my main problem is:
- howto get the child(s) spawn a xterm and use it for stdio

and:
- how can i get rid of the Expect.pm and give the stdio control to the user/xterm after doing the login stuff?

working on AIX 4.3.3 with perl 5.005_03 built for aix

thx for any hints...
sorry for the english, no native speaker inside ,)

In reply to launch xterm for STDIO to perl script for telnet by aurux

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.