LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-24-2002, 10:11 AM   #1
tn1681
LQ Newbie
 
Registered: Jul 2002
Posts: 12

Rep: Reputation: 0
telnet script


I have built a telnet script to originate from a terminal, login via telnet to a remote system, a 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?

Thanks...
 
Old 07-24-2002, 11:17 AM   #2
orgcandman
Member
 
Registered: May 2002
Location: new hampshire
Distribution: Fedora, RHEL
Posts: 600

Rep: Reputation: 109Reputation: 109
The problem is that the telnet session is holding the xterm's controlling tty. once your telnet session closes, the controlling tty closes. the & only puts it in the background of that terminal. as far as keeping the session open, just leave out the & and I think the telnet session will stay up. if you don't want the telnet session up, I don't know what to tell you.

Aaron
 
Old 07-25-2002, 12:34 AM   #3
tyler_durden
Member
 
Registered: May 2001
Posts: 125

Rep: Reputation: 15
you can do
xterm -display xxx.xxx.xxx.xxx:0.0&

this works for me doing ssh then closing the ssh terminal.
 
Old 07-25-2002, 11:09 PM   #4
Matt00SS
LQ Newbie
 
Registered: Jul 2002
Posts: 10

Rep: Reputation: 0
Try changing the line:

echo ' Xterm program...blah, blah &'

to:

echo 'nohup Xterm program...blah, blah &'

Matt
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can we telnet the system using shell script suchi_s Programming 18 02-18-2005 03:43 PM
telnet script help GUIPenguin Linux - General 2 01-16-2005 03:48 PM
Telnet script pirra Programming 1 12-29-2004 04:04 PM
Telnet script?? mike400hp Linux - Newbie 6 08-22-2003 04:41 PM
telnet script tn1681 Programming 2 07-24-2002 09:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration