LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   telnet script (https://www.linuxquestions.org/questions/programming-9/telnet-script-26474/)

tn1681 07-24-2002 12:38 PM

telnet script
 
I have built a telnet script to originate from a terminal, login via telnet to a remote system, to intiate an Xterm program.

Here is roughly how it looks...

xhost +

(echo "login"
sleep 2
echo "password"
echo "export DISPLAY X.X.X.X:0.0"
echo ' Xterm program...blah, blah &'
sleep 10) | telnet X.X.X.X

This telnets fine. It logs in fine. The sleep 10 gives it enough time to initiate the Xterm program. It is my understanding that the "&" should allow the program to operate even after telnet logout.

however, after the sleep 10, the telnet session closes, and the Xterm program along with it. Can anybody tell me if this is a script problem, or a telnet problem?

If the controlling TTY is logging out after the sleep, how can I maintain the Xterm program/window?

Thanks...

Mara 07-24-2002 04:07 PM

I don't remember how is it with telnet, but it may be an Xterm problem. It closes after the program you gave it to run closes.
The above sentence doesn't look good, but I hope you understand what I mean.

crabboy 07-24-2002 09:47 PM

Please do not double post.

http://www.linuxquestions.org/questi...threadid=26461

Closing thread.


All times are GMT -5. The time now is 10:17 PM.