I haven't done any real perl work for 3 years, so I am very rusty.

I am trying to create a boot CD which will turn a home PC into a secure node for a corporate network. Using KNOPPIX, I can easily create the CD. The problem starts when I try and activate the VPN solution.

It is a 2 step process. First the VPN gets set up (which requires user input) and then a small perl-Tk runs which asks them the IP address of the Windows Terminal Server they want to connect to, which then runs rdesktop in full screen mode. Viola, they can work at home as if they were sitting at their desk in the office. All the user will ever see is my two scripts (vpn questions and server IP questions) - not even a KDE or Gnome window manager gets started.

The VPN client will not accept username and pass on the command line, so it must be interactive. Secondly, the client does NOT return control to the terminal (prompt does not come back). Once the VPN is active, it does respond to a cntrl-z, bg command set, however.

So, I can easily write a nice perl-tk to ask their username and password, but how do I then run the vpn client and make it think that the it's being passed those data by the user, and not a script? Secondly, how do I know when the VPN client process is complete and running so I can move on to asking for the WTS/RDP server info from the user?

VPN client asks for: Username[<default>]:
then it asks: Pin and SecurID:
If accepted, it spits out some text about secure systems and finishes with a yes/no acceptance query: [y/n]:

At that point I need the VPN process to be backgrounded and the script to move on to my other IP Server questionare script (which already works).

Any help would be greatly appreciate, since even in my heavy perl days I was never that involved with process manipulation.


What does this little button do . .<Click>; "USER HAS SIGNED OFF FOR THE DAY"

In reply to Backgrounding interactive processes by tame1

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.