Jump to content

How to run console command (linux) ?


Recommended Posts

6 hours ago, cooltabeuh said:

Greeting,

I run a dedicated server on linux and I want to use console commands without connecting to the server but I'm not sure how?

You can't run console commands on a server you are not somehow connected to. Telepathy hasn't been shown to work :p

I assume you meant "how to run console commands on a server without joining the game" - this is possible - you need to access the server process' terminal - if you followed Tonio's guide, you could achieve this by attaching to the screen session used by the server.

screen -ls
# this will list current sessions

screen -r <session name>

You can also push commands into the screen session without attaching to it, but this is a bit tricky, requiring escape sequences for common characters like RETURN, etc..

screen -S <session name>  -X stuff $'c_announce("'"Server is shutting down in 5 seconds."'",nil,"leave_game")\r'

 

Link to comment
Share on other sites

Yeah, my bad I misspoke :p. Indeed I followed the awesome guide of Tonio's! But since i'm a noob in this domain :?, I might need more explanations.

So I have to push this command ?

screen -r <session name>

but do I have to do it in a specific folder like "/home/dst/", root folder or anywhere else?

Edit:

Ok I had to do it in /home/dst/server_dst/bin/ but now I'm stuck with screen -r, I get :

Cannot open your terminal '/dev/pts/1' - please check.

screen.jpg

Edit 2:

I finally made it works with some searchs on google, I had to

script /dev/null

and then

screen -r <session name>

 

Thanks for the help @myxal!

 

Link to comment
Share on other sites

You can also use

screen -rx

to reattach one screen session to your console again. This is useful if you want to just shut down all servers by reattaching and shutting them down after another without needing to reattach the sessions using their names individually, or if you only have a single screen session in the first place (Single world DST servers, or other game servers).

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...