Running a program in the background - SSH
How can i run a program in the background if im connected to a comptuer through SSH? I know i can use the command say './hlds_run &' and it will start in the background, but when i disconnect my session the terminal closes and the program closes. I only have access to the homedir of my account. So all in a nutshell is there a command i can use to run the program in the background even after ive closed the terminal? Thanks for everyones replys
|
|
Thank you very much :)
So i started the command in /home/x7hus/hlds/ since the program 'hlds_run' is in there. I used the following to launch the program for the first time Code:
nohup ./hlds_run -console -game cstrike -secure -port 27015 +ip 67.19.135.182 +maxplayers 16 +map de_dust2 Code:
nohup ./hlds_run -console -game cstrike -secure -port 27015 +ip 67.19.135.182 +maxplayers 16 +map de_dust2 & |
In theory. :)
|
Screen
Theres also a really cool program called Screen that allows you to run the program in a console that you can attach and detach.
So basicly you start up your screen with something along the lines of : screen <flags> <screen name> <program> ( i cant remember my exact start up line, its burried in a startup script on another computer). Then you can detach the screen using "Ctrl+a" then "d". now you can exit your session, and any time you want to connect to check it out, you can ssh back in and do: screen -r <screen name> Head over to : http://server.counter-strike.net/for...ghlight=screen for a little more information. __ Bitwaba |
All times are GMT -5. The time now is 01:23 AM. |