LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 05-10-2009, 05:38 AM   #1
damoh
LQ Newbie
 
Registered: May 2009
Posts: 5

Rep: Reputation: 0
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
 
Old 05-10-2009, 05:45 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
you can use
Code:
nohup command
 
Old 05-10-2009, 05:46 AM   #3
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
Hi, and welcome to LQ!

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


Cheers,
Tink
 
Old 05-10-2009, 05:50 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Quote:
Originally Posted by repo View Post
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.
 
Old 05-10-2009, 05:52 AM   #5
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
Quote:
Don't forget to put the process in background using & at the end of the command line
Thanks for the correction.
 
Old 05-10-2009, 07:01 AM   #6
damoh
LQ Newbie
 
Registered: May 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by colucix View Post
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
 
Old 05-10-2009, 07:07 AM   #7
damoh
LQ Newbie
 
Registered: May 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Tinkster View Post
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
 
Old 05-10-2009, 07:27 AM   #8
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
Have you tried the nohup command? Does it work?
Code:
nohup ./srcds_run -console -game cstrike +map de_dust -maxplayers 24 -autoupdate &

Last edited by colucix; 05-10-2009 at 07:28 AM.
 
Old 05-10-2009, 07:31 AM   #9
damoh
LQ Newbie
 
Registered: May 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by colucix View Post
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.
 
Old 05-10-2009, 07:34 AM   #10
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
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.
 
Old 05-10-2009, 07:40 AM   #11
damoh
LQ Newbie
 
Registered: May 2009
Posts: 5

Original Poster
Rep: Reputation: 0
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
 
Old 05-10-2009, 11:39 AM   #12
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,527

Rep: Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898Reputation: 898
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'
 
  


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
Putty disconnects session. groxy Linux - Software 1 03-20-2009 06:33 AM
putty saved session melvinong Linux - Server 4 11-14-2007 06:33 AM
OpenBSD - putty session takes forever to start... lazlow69 *BSD 1 11-14-2005 12:55 AM
lose telnet session (timeout ? - putty) alexia AIX 7 08-17-2005 08:47 AM


All times are GMT -5. The time now is 06:44 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