Results 1 to 10 of 10
Hi guys,
this problem is not strictly linux related, but I seem to find a lot of my answers here, so I figured it was a great place to ask. ...
- 01-28-2012 #1Just Joined!
- Join Date
- Jan 2012
- Posts
- 23
screen commandline tool bugged?
Hi guys,
this problem is not strictly linux related, but I seem to find a lot of my answers here, so I figured it was a great place to ask. anyway:
I have a Minecraftserver running on my server. The server is setup with the ubuntu 10.04 LTS Desktop installation.
I am maintaining my minecraftserver by ssh'ing to the server and having the MC server run in a screen session.
I've started the screen as such:
my problem is this:Code:screen -S mc java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
When i want to restart the server for various reasons, i connect to the session by typing
Upon gaining access i typeCode:screen -r mc
to have the MC server save and close. This also closes the screen session window.Code:stop
now my trouble is, that when i try to create the session again, all i get is the message
I tried typing 'screen -ls' to see if the session was still running. I've tried 'killall -9 screen' to be certain. Still i only get that annoying message.Code:[Screen is terminating]
I tried creating the screen session from another user, which worked, but only until trying to restart the session. Then same problem.
Incidently, i sortof solved it by reinstalling screen altogether, but that is hardly the proper solution.
If anyone would offer an idea to why this message appears and how to fix it, i'd be most appreciative
- 01-28-2012 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,970
So what changed between when it worked as expected, and then started to not work as expected?
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 01-28-2012 #3Just Joined!
- Join Date
- Jan 2012
- Posts
- 23
with a clean install of screen, I can open all the sessions I want. However, when i close the session running minecraft, i cannot open or connect to any session, but only get the message [Screen is terminating] ... upon reinstalling screen, it works again until i close the minecraft session...
- 01-28-2012 #4
- 01-28-2012 #5Just Joined!
- Join Date
- Jan 2012
- Posts
- 23
I may have misspoken then. This was originally the case. Was like that on my first try
- 01-28-2012 #6Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,970
Ok. Thanks for the clarification. I'll have to some codgertating on this.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 01-28-2012 #7Just Joined!
- Join Date
- Jan 2011
- Location
- Fairfax, Virginia, USA
- Posts
- 94
Hi, I think I understand your problem. The problem is the screen parent process is terminating which will end your session.
Try this ... try starting screen like you did before, but just do this:
Okay, now in your (new) bash shell, start minecraft with your java command. To leave the screen session, detach with ^a^d (control + a control + d). Now to attach to your screen session later, use:Code:[root@bmicek ~]# screen -S myScreen
To leave the session, enter ^a^d like beforeCode:[root@bmicek ~]# screen -x myScreen
Last edited by BrianMicek; 01-28-2012 at 11:42 PM. Reason: typo error, sorry
- 01-29-2012 #8Linux User
- Join Date
- Jan 2005
- Location
- Saint Paul, MN
- Posts
- 262
Since you put the command on the screen command line, the screen ends when the command ends. You really wish to create a screen and then enter the screen to run the command.
The "control-ad" is a "control-a" followed by a "d".Code:screen -dmS mc screen -r mc java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui control-ad
- 01-29-2012 #9Just Joined!
- Join Date
- Jan 2012
- Posts
- 23
That makes perfect sense, actuallyThe problem is the screen parent process is terminating which will end your session.
I'll try that out as soon as i get the chance and report back on my successOkay, now in your (new) bash shell, start minecraft with your java command. To leave the screen session, detach with ^a^d (control + a control + d). Now to attach to your screen session later, use:
- 01-29-2012 #10Just Joined!
- Join Date
- Jan 2012
- Posts
- 23
Works like a dream
thanks Brian and the rest of y'all


Reply With Quote
