Possible Duplicate:
sending text input to a detached screen
I have a script for my Minecraft server that runs automatically every 15 minutes. The problem is that after a server reboot, minecraft is automatically started in Gnu Screen. This is ideal, of course, except that for some reason the script (which returns no errors in this case) can't seem to "connect" with the screen if I don't SSH in and manually attach, then detach the screen.
The script runs, but nothing happens within the screen. I have checked that I am the owner of the screen (as opposed to a system owner), and it checks out. The screen exists, and is titled properly, and everything seems like it should be working.
But if I don't login to attach the screen manually first, my script can't communicate with the screen.
Does anyone have any clue why this is and how I can work around it?
screen
that has been discussed in relation to minecraft specifically on this question. There are solutions to makescreen
behave and explanations of how to switch to tmux which is better behaved. – Caleb Aug 07 '11 at 16:57