logout question [4]

logout question

Wednesday, October 22, 2008 7:15 PM - paulb39

I'm new to linux, so hopefully this ain't a noob question.

I have a linux server I connect via ssh with xshell

I do commands to start a cod(game) server.

If I exit xshell, my cod server also exits (I guess it logouts or something of that sort?)

Is there anyway to be able to exit xshell, but be able to keep the game server running?

Program Ver. : Xshell 3.0


Re: logout question

Thursday, October 23, 2008 12:27 AM - Stephane Rosa

"nohup" is your friend. put it in front of your command and do not forget the ampersand (&) at the end to put the process in the background.

Try for example :

nohup ./cod_lnxded +exec h20war.cfg &

Then logout, your process will still be around when you come back.


Re: Re: logout question

Thursday, October 23, 2008 7:15 PM - paulb39

Thx M8. Helped a lot.

Couple of questions

When I do start a cod server (nohup ./cod_lnxded +exec server.cfg &) I'm in the "console" and can type in commands such as map mp_carentan

If I do that command, then get out of xshell, then get back in. How do I get in that cod console again?

Also, how do I make it so services/programs start on boot?

I need to start teamspeak, cod, and gameserver (a game panel service). Instead of having to manually start them, how can I make the mautomadically start on boot?


Re: Re: Re: logout question

Thursday, October 23, 2008 9:39 PM - Zookeyan

'Screen' will be the best way in this case.
The screen program is a kind of virtual terminal.
Run screen and then run programs which you want.
Though you exit Xshell, at any time, anywhere you can get into the screen terminal.

$screen -> A virtual terminal will be created.
$command -> This command runs in a screen virtual terminal
$^C^Z -> The virtual screen will be suspended.
$bg

When you want to get into the screen terminal, run command 'screen -d -r SCREEN_ID'. You can find SCREEN_IDs using the 'screen -r' command.

For more information, please see the man page.

If you want to start this on boot, you should type in or make file in RC directory. If you have a linux system, just type the command into the end of /etc/rc.d/rc.local file.



Re: Re: Re: Re: logout question

Friday, October 24, 2008 8:12 AM - paulb39

Thanks m8! Works perfectly


Previous views: 249