Dr. Mu has asked for the wisdom of the Perl Monks concerning the following question:

I'm building a headless data acquisition box (RH Linux 7.1), which is controlled over a network by a Windows laptop. Both the acquisition program (server) and control program (client) are written in Perl. The Linux box's video output is used to monitor the incoming data in real time. I'm using Tk under Gnome to display the data. I'm able to login via Net::Telnet from the client program, start Gnome, and get the server program running. From there, communication with the server program takes place using SOAP::Lite. What's got me stuck at this point is the reverse process -- logging out. Does anyone know how to either:

1. Send the telnet logout command via an open Net::Telnet connection? (Once Gnome is started via startx, telnet blocks, waiting for the X session to finish, so using $connection->cmd is not possible. Also, breaking the telnet connection doesn't force a logout -- nor do I want it to.)


2. Have the Perl script running on the server force an exit/logout sequence?

Many thanks! This has had me stumped for several days now, and I've exhausted the resources I'm familiar with.