SRCDS Steam group


Screen help in Ubuntu
#1
Hello there, I am running ubuntu 7.10 64bit.
I can't seem to get screens to work, I made a server.sh file with
Code:
#!/bin/sh
echo "Starting Cs:Source Server"
sleep 1
screen -A -m -d -S css-server ./srcds_run -console -game cstrike +map de_dust +maxplayers 16 -autoupdate

I tried looking on the ubuntu forums about screens with no luck, Sad
Just want to get the servers to run in screens.
Reply
#2
Are you getting an error from it or anything? Need more info on what is wrong..

Do you mean you run the shell script but nothing happens?

Code:
#!/bin/sh
echo "Starting CStrike Match Server"
sleep 1
screen -A -m -d -S srcds_match ./srcds_run -game cstrike -port 27015 +maxplayers 12 +map de_dust2 -tickrate 100 +fps_max 1000 -autoupdate

Thats what i use, exactly the same, with no problems.

I also assume you have screen installed.

You could try running:

Code:
./srcds_run -console -game cstrike +map de_dust +maxplayers 16 -autoupdate

by itself from a terminal window to rule out SRCDS being the problem.
Reply
#3
aptget install screen
??
Reply
#4
I have screen installed, it starts up fine with
Code:
#!/bin/shs
echo "Starting Cs:Source Server"
sleep 1

./srcds_run -console -game cstrike +map de_dust2 +maxplayers 28 -autoupdate -port 27015 -secure

With the other code for screen it says.
"Starting Cs: Source Server"
then hides, can't see it ever again. Not sure how to bring it back up.
It looks like it works, opens the screen, says starting cs source server just can't seem to get it to come back up. Sad

Edit: I restarted the computer and ran the server.sh it says starting server
Then I went into terminal and typed screen -x css-server
"There is a screen on:
6222.css-server (Dead ???)
Remove dead screens with 'screen -wipe'
There is no screen to be attached matching css-server.
jake@clanwoof:-$
Reply
#5
then your having an issue with your srcds
try just the ./srcds_run -console..... line and see what happens
Reply
#6
what happens when you do "screen -S css-server" then run the server command manually? does the server start? if so then you can just detach from the screen. one extra step but at least you know the server is running.
Reply
#7
Not sure now, had some bad issues with ubuntu getting screwed up. So installing Fedora 8 at the moment. Sad
It's always nice when someone gives you a command that screwed your system up. Smile
Could not log into my user acount anymore or change anything via root. Tried everything for the last 5 hours. At least fedora has the same feel as ubuntu. I also have it setup on my laptop so I can use it as the test for somethings so I don't screw up my server.
Reply
#8
screen is not going to screw your system up unless you do something IN that screen terminal. unless it was some other command.....
Reply
#9
Yeah, it was nothing to do with screens it was some script someone gave me and told me to change some permisions.. Noob for the lose. Never knew it would screw everything up.
Reply
#10
Okay, so I am back with ubuntu. Are screens really needed here?
I have 6-7 servers running on my one dedicated server. Ubuntu 7.10 server with gui installed on it. The servers run fine if I type out ./srcds_run ........ and so on.
When I try to use the screen code.

Code:

#!/bin/sh
echo "Starting CStrike Match Server"
sleep 1
screen -A -m -d -S srcds_match ./srcds_run -game cstrike -port 27015 +maxplayers 28 +map de_dust2 -tickrate 100 +fps_max 600 -autoupdate

And try to run it A screen pops up for like 2 seconds and says
"Starting Cs:Source Server"
Then it disappears.

Should I just give up on the screens and live with having 7 terminal windows open? Not sure if it changes much.
Reply
#11
thats the point of screen. you can hide it. you dont need to have a bunch of terminals open in the gui and you can access them from any terminal including ssh. after it goes away type
screen -x
then youll either be connected to the one instance you have running or if you have multtples running it will list them. to pull up one from the list there is a number before the screen session name type:
screen -x number

then it will pop up. to unattach the screen press cntrl+a then d

theres your crash course in screen
Reply
#12
Well that helped alot. Smile Now I know how that kind of works.
You guys are great. Big Grin
Reply
#13
he didn't mention it but if you don't use screen or fail to disconnect from screen if you close the window the server shuts down. also when you open a screen the -S flag names it. so if you did:

screen -S clanwoof etc etc

you can then re-attach to it later using "screen -r clanwoof" instead of a number
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)