LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Help Needed with putty session (https://www.linuxquestions.org/questions/linux-newbie-8/help-needed-with-putty-session-724959/)

damoh 05-10-2009 04:38 AM

Help Needed with putty session
 
Hi all
I am a linux noob ( certainly lol) but i am rapidly learning. Basically myself and a few friends rented a Linux box, mainly just to play counter strike on. As our requirements are low we only needed one linux server ( cost mainly). Now, im learning linux but this is my prob
I can logon to the box using putty, no probs, i can install the game of my choice no probs. However i have to leave putty running in order for the server to stay active. If i close putty, the game quits. I have read however that there is a nohup command and some other stuff that i can try in order to close putty but leave processe running on the box. This is what i feel i need. Is there anyone who can help me with this. These commands are new and somewhat alien to me. Ive tried with what i can find but to no avail.

Many thanks in advance
Damoh

repo 05-10-2009 04:45 AM

you can use
Code:

nohup command

Tinkster 05-10-2009 04:46 AM

Hi, and welcome to LQ!

As for nohup - did you *try* that? What happened? How
did you invoke the game you started?


Cheers,
Tink

colucix 05-10-2009 04:50 AM

Quote:

Originally Posted by repo (Post 3536010)
you can use
Code:

nohup command

Don't forget to put the process in background using & at the end of the command line. You can also try screen as suggested in this post.

repo 05-10-2009 04:52 AM

Quote:

Don't forget to put the process in background using & at the end of the command line
Thanks for the correction.

damoh 05-10-2009 06:01 AM

Quote:

Originally Posted by colucix (Post 3536014)
Don't forget to put the process in background using & at the end of the command line. You can also try screen as suggested in this post.

Hi,unfortunalty screen does not seem to be installed. But after ive managed this i shall look into this. At least im learning lol

damoh 05-10-2009 06:07 AM

Quote:

Originally Posted by Tinkster (Post 3536011)
Hi, and welcome to LQ!

As for nohup - did you *try* that? What happened? How
did you invoke the game you started?


Cheers,
Tink


hi
./srcds_run -console -game cstrike +map de_dust -maxplayers 24 -autoupdate



that is the command i use to start the game. I navigate to my home dir then to my game dir, run that command and all is good.
Hope that helps
Regards

colucix 05-10-2009 06:27 AM

Have you tried the nohup command? Does it work?
Code:

nohup ./srcds_run -console -game cstrike +map de_dust -maxplayers 24 -autoupdate &

damoh 05-10-2009 06:31 AM

Quote:

Originally Posted by colucix (Post 3536057)
Have you tried the nohup command? Does it work?
Code:

nohup ./srcds_run -console -game cstrike +map de_dust -maxplayers 24 -autoupdate &


nohup ./srcds_run -console -game cstrike +map de_dust -maxplayers 24 -autoupdate &
[5] 30527
[root@host-95-154-194-34 css]# nohup: appending output to `nohup.out'


Thats what i get mate, then it just hangs.

colucix 05-10-2009 06:34 AM

Hangs? That is the normal output: it means that the standard output and the standard error are sent to the file nohup.out to check them later. Have you pressed "Enter" after that message appeared? You should return to the command prompt.

damoh 05-10-2009 06:40 AM

Ah!, i restarted it again and checked it worked!!, i assumed it hadnt because usually when the server starts it scrolls text about the point the server is at whilst starting. Now, i closed putty and it is still up woo hoo, now i just need to figure out how to stop the server lol

repo 05-10-2009 10:39 AM

Quote:

now i just need to figure out how to stop the server lol
use "ps ax" to find the pid and kill it or remember the pid (here 30527)

Quote:

nohup ./srcds_run -console -game cstrike +map de_dust -maxplayers 24 -autoupdate &
[5] 30527
[root@host-95-154-194-34 css]# nohup: appending output to `nohup.out'


All times are GMT -5. The time now is 01:04 PM.