LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-09-2003, 09:03 PM   #1
Awatto
Member
 
Registered: Aug 2003
Location: Halifax, NS
Distribution: Debian, Gentoo, Ubuntu, Fedora
Posts: 128

Rep: Reputation: 30
Application over an SSH connection


Is there a way I can run an application over an SSH connection, and have it continue to run even when I close the connection (ie, i close putty on my windows machine, and the application stops running on the linux box). I want to run a Counter-Strike server off a linux box which I do not have keyboard access to unless I want to walk down to my brothers house every time I want to start it up. Is there any way I can do this?
 
Old 11-09-2003, 09:22 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
I don't know how putty handles this, but I
can do a
<command>&
in ssh, and if I disconnect, and reconnect,
it will still be running...

Cheers,
Tink
 
Old 11-09-2003, 09:29 PM   #3
Awatto
Member
 
Registered: Aug 2003
Location: Halifax, NS
Distribution: Debian, Gentoo, Ubuntu, Fedora
Posts: 128

Original Poster
Rep: Reputation: 30
Hmm, that sounds exactly like what I want, but Putty doesnt seem to like it. I close the putty window and it just exits the program. What do you use for the SSH connection?
 
Old 11-09-2003, 09:47 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Linux 2 linux .... a simple xterminal ;)

Cheers,
Tink
 
Old 11-09-2003, 09:55 PM   #5
wdingus
Member
 
Registered: Aug 2001
Location: Kingsport, TN
Distribution: RHEL & FC
Posts: 267

Rep: Reputation: 30
For a non-graphical console app, "screen" is your friend...

# man screen

# screen

# ^A C

# ^A 0

# ^A 1

# ^A D

# screen -list

# screen -R

etc...
 
Old 11-09-2003, 10:51 PM   #6
lotusjps46
Member
 
Registered: Apr 2003
Location: Dallas
Distribution: Vector Linux, Suse 10.1
Posts: 186

Rep: Reputation: 30
If you start a application with the "&" symbol after it it will continue to run after you close the shell, but I think it will stop when you log out. Might try "nohup whateverappyouwant &" and see if that works. nohup means No HangUp.
 
Old 11-09-2003, 11:09 PM   #7
siyeclover
Member
 
Registered: Jan 2003
Location: RaMetal
Distribution: Solaris,FC2,FreeBSD
Posts: 41

Rep: Reputation: 15
Do as this:
nohup your_program

It will continue run when u logout.



siyeclover
 
Old 11-10-2003, 03:51 PM   #8
Awatto
Member
 
Registered: Aug 2003
Location: Halifax, NS
Distribution: Debian, Gentoo, Ubuntu, Fedora
Posts: 128

Original Poster
Rep: Reputation: 30
Hmm, ill try that.
 
Old 11-10-2003, 04:16 PM   #9
Mikhail_16
Member
 
Registered: Oct 2003
Distribution: Gentoo rules them all
Posts: 279

Rep: Reputation: 31
yep yep 'nohup' is your friend just do

'nohup [your app] &' and you are good to go

I know it does work 100% cause i administer linux servers that are 300 miles from where i live that way.
 
Old 11-10-2003, 04:19 PM   #10
Awatto
Member
 
Registered: Aug 2003
Location: Halifax, NS
Distribution: Debian, Gentoo, Ubuntu, Fedora
Posts: 128

Original Poster
Rep: Reputation: 30
nohup: appending output to `nohup.out'

know how to fix this by any chance while you're on? I admit I haven't read much about it, I'm trying to but can't find much...
 
Old 11-10-2003, 04:22 PM   #11
Mikhail_16
Member
 
Registered: Oct 2003
Distribution: Gentoo rules them all
Posts: 279

Rep: Reputation: 31
do not worry about those files it just redirects output there. delete them once in a while they are harmless. Basically just a log file.
 
Old 11-10-2003, 04:29 PM   #12
Awatto
Member
 
Registered: Aug 2003
Location: Halifax, NS
Distribution: Debian, Gentoo, Ubuntu, Fedora
Posts: 128

Original Poster
Rep: Reputation: 30
Ok, worked great, now how do I end the program?
 
Old 11-10-2003, 04:52 PM   #13
Mikhail_16
Member
 
Registered: Oct 2003
Distribution: Gentoo rules them all
Posts: 279

Rep: Reputation: 31
errr

'ps ax | grep "your program" '
or just 'ps ax' for full list

find your program's number from above

'kill [program number]'

or 'killall [program name]'
 
Old 11-10-2003, 05:31 PM   #14
rameth
Member
 
Registered: Aug 2003
Location: new zealand
Distribution: debian unstable
Posts: 32

Rep: Reputation: 15
i recently came across
"pkill" and "pgrep"
check them out quit handy.
i found pgrep very handy as "ps ax | grep <whatever>" always returned the "ps .." as
a match as well - a nuisance in scripts.


Always learning more about linux
 
Old 11-11-2003, 01:41 PM   #15
Awatto
Member
 
Registered: Aug 2003
Location: Halifax, NS
Distribution: Debian, Gentoo, Ubuntu, Fedora
Posts: 128

Original Poster
Rep: Reputation: 30
looks handy, I'll have to give that a try next time I need to shut the server down

Just read the manuals.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Running remote application through SSH tuananhbirm Linux - General 1 11-15-2005 03:42 AM
Application to know my dial-up connection speed? asklepios Linux - General 3 03-07-2004 08:48 AM
which application I can use in Suse 9.0 pro for remote access connection user/psw mcandy Linux - Software 0 03-05-2004 04:41 AM
Socket Application: Connection refused Agent007 Linux - Networking 1 01-27-2004 01:48 AM
application for dial-up connection? asklepios Linux - Software 6 01-16-2004 07:59 PM


All times are GMT -5. The time now is 06:52 PM.

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