LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Newbie
User Name
Password
Linux - Newbie This 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
 
Thread Tools
Old 05-10-2009, 05:38 AM   #1
damoh
LQ Newbie
 
Registered: May 2009
Posts: 5
Thanked: 0
Help Needed with putty session


[Log in to get rid of this advertisement]
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
damoh is offline     Reply With Quote
Old 05-10-2009, 05:45 AM   #2
repo
Senior Member
 
Registered: May 2001
Location: Belgium
Distribution: Debian/GNU Linux
Posts: 4,542
Thanked: 447
you can use
Code:
nohup command
repo is offline     Reply With Quote
Old 05-10-2009, 05:46 AM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :}
Posts: 18,849
Blog Entries: 1
Thanked: 160
Hi, and welcome to LQ!

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


Cheers,
Tink
Tinkster is offline     Reply With Quote
Old 05-10-2009, 05:50 AM   #4
colucix
Guru
 
Registered: Sep 2003
Location: Bologna, Italia
Distribution: OpenSUSE 11.1 CentOS 5.4 VectorLinux 6.0
Posts: 5,134
Thanked: 465
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.
colucix is offline     Reply With Quote
Old 05-10-2009, 05:52 AM   #5
repo
Senior Member
 
Registered: May 2001
Location: Belgium
Distribution: Debian/GNU Linux
Posts: 4,542
Thanked: 447
Quote:
Don't forget to put the process in background using & at the end of the command line
Thanks for the correction.
repo is offline     Reply With Quote
Old 05-10-2009, 07:01 AM   #6
damoh
LQ Newbie
 
Registered: May 2009
Posts: 5
Thanked: 0

Original Poster
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
damoh is offline     Reply With Quote
Old 05-10-2009, 07:07 AM   #7
damoh
LQ Newbie
 
Registered: May 2009
Posts: 5
Thanked: 0

Original Poster
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
damoh is offline     Reply With Quote
Old 05-10-2009, 07:27 AM   #8
colucix
Guru
 
Registered: Sep 2003
Location: Bologna, Italia
Distribution: OpenSUSE 11.1 CentOS 5.4 VectorLinux 6.0
Posts: 5,134
Thanked: 465
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..
colucix is offline     Reply With Quote
Old 05-10-2009, 07:31 AM   #9
damoh
LQ Newbie
 
Registered: May 2009
Posts: 5
Thanked: 0

Original Poster
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.
damoh is offline     Reply With Quote
Old 05-10-2009, 07:34 AM   #10
colucix
Guru
 
Registered: Sep 2003
Location: Bologna, Italia
Distribution: OpenSUSE 11.1 CentOS 5.4 VectorLinux 6.0
Posts: 5,134
Thanked: 465
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.
colucix is offline     Reply With Quote
Old 05-10-2009, 07:40 AM   #11
damoh
LQ Newbie
 
Registered: May 2009
Posts: 5
Thanked: 0

Original Poster
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
damoh is offline     Reply With Quote
Old 05-10-2009, 11:39 AM   #12
repo
Senior Member
 
Registered: May 2001
Location: Belgium
Distribution: Debian/GNU Linux
Posts: 4,542
Thanked: 447
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'
repo is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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 02:31 PM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration