LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 04: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, 04:45 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
you can use
Code:
nohup command
 
Old 05-10-2009, 04:46 AM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
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, 04:50 AM   #4
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
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, 04:52 AM   #5
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
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, 06: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, 06: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, 06:27 AM   #8
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
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 06:28 AM.
 
Old 05-10-2009, 06: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, 06:34 AM   #10
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
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, 06: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, 10:39 AM   #12
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
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



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 05:33 AM
putty saved session melvinong Linux - Server 4 11-14-2007 05:33 AM
OpenBSD - putty session takes forever to start... lazlow69 *BSD 1 11-13-2005 11:55 PM
lose telnet session (timeout ? - putty) alexia AIX 7 08-17-2005 07:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:31 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
Open Source Consulting | Domain Registration