Send command to screen session from web

April 5, 2014 3.8k views
I am creating a control panel for minecraft and need to find a way to send commands to a screen session. I can run a shell script from php's system() command. But when I do: screen -S minecraft -X stuff "stop" and switch to my sceen session, it shows stop written but it is as if enter was not pressed after enterin the command So, how do I simulate enter in shell?
2 Answers
Try adding \n which stands for "new line" after stop (inside the quotation marks). Does that work?
Have another answer? Share your knowledge.