M BUZZ CRAZE NEWS
// news

Screen not detaching with Ctrl+A D

By Emma Johnson

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.

2 Answers

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 ~]$
1

I think this is what you want:

screen

And go open your server.

Now you can use Ctrl+A D.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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