3

I have a Virtual Private Server (VPS) through Digital Ocean, and I'm using PuTTY to SSH to it. I have a Minecraft server, and whenever I launch the server, it creates a screen session.

Whenever I press Ctrl+A D or any other combination of A and D, nothing happens. I've tried Ctrl+Alt+D, Ctrl+A Ctrl+D, screen -D, and nothing seems to work.

Ctrl+A D only seems to work once every few dozen times I completely restart the server.

Ctrl+C works fine, but it also shuts off the Minecraft server. If I close PuTTY, it also closes the server. Is there any other way I can detach the screen, or have Minecraft auto-launch when the VPS starts up?

It's running on Ubuntu 16.04 64-bit.

0

A default installation of screen under Ubuntu usually has "autodetach" enabled, so you don't need to explicitly detach the screen. You could just close your SSH session and screen will automatically detach instead of killing the session.

However, if you do want to explicitly detach it, you can open a second SSH session to your server and use that to remotely detach the running session.

SSH in and do "screen -list" to find the PID for the running screen session, then "screen -d xyz" to detach it. Here's an example:

[jdoe@blah ~]$ screen -list
There is a screen on:
        7851.pts-6.blah     (Attached)
1 Socket in /var/run/screen/S-jdoe.

[jdoe@blah ~]$ screen -d 7851.pts-6.blah
[7851.pts-6.blah detached.]

[jdoe@blah ~]$
| improve this answer | |
  • >You could just close your SSH session and screen will automatically detach instead of killing the session. I did a default installation and this doesn't seem to be the case. As stated in the OP, if I close the PuTTY (Closing the SSH), it will kill the session. I'll give the second SSH session a shot, though. – issvor Mar 9 '18 at 22:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.