3

When I play mulit-player Minecraft, with my family, I use an external server. Everyone once in a while the session drops in my local PC. I can re-open a new terminal and log back into the server. I can use ps aux|grep minecraft to see that the original process is still running, but I cannot see the activity or enter commands. Is there anyway I can join that running process?

What I am saying is that when I had the terminal session open and started Minecraft (MC), I could enter commands into the MC server like /list to see users, /weather clear to stop rain, etc.. etc..
When I lost the connection and logged back in I cannot see the activities going on in the server window. I can see the process is still running, but what I wanted to do was to be able to join the process as before, and enter MC commands again.

Phil
  • 31

1 Answers1

6

GNU Screen is a tool that lets you reattach to a previous session. Just install it on your remote server.

apt-get install screen

Now when you connect to the machine via SSH, just type screen and press Space. You will be back to your normal terminal. Run whatever you want (minecraft) here.

Now assume your connection dropped. Buy don't worry, because it is still running in the screen session you created before. All you have to do is to re-SSH and the attach to the already running screen session. You can get a list of running sessions by:

screen -ls

From the list, choose the session you want to connect to and type:

screen -r <session-name>

And you are back!

This is one of the many awesome things you can do with screen. I have written only the minimal usage information required to achieve what the OP wanted. Here is a good tutorial if you are interested.

To exit the screen session, just type exit.

muru
  • 207,228
daltonfury42
  • 5,559