54

When I type screen -r I expect to either see: A list of screens to resume, or a message "There is no screen to be resumed."

Today, I see there is one screen, but I still get the message that there is no screen to be resumed:

[root@server chiliNUT]# screen -r
There is a screen on:
        27863.pts-1.server     (Attached)
There is no screen to be resumed.
[root@server chiliNUT]# screen -rx 27863
[detached]
[root@server chiliNUT]# screen -r
There is a screen on:
        27863.pts-1.server     (Attached)
There is no screen to be resumed.

Why is it reporting that the screen is attached? I just detached it on the line above ([detached])

75

As screen -r says, there is one screen, but it is attached. To resume it on your current terminal, you have to detach it from the other one first: screen -d -r 27863, see manpage -d.


Edit: use -d instead of -x.

Edit2: @alex78191: When using -x, screen attaches to the currently running session, resulting in a "multi-display mode": you see the session on both terminals simultaneously, i.e., when entering a command on one terminal, it also appears on the second. However, detaching from a multi-display mode just detaches the current terminal. You hence get the message that it is still attached (on the other terminal).

  • 1
    Why not use -x? – Alex78191 Dec 10 '17 at 12:55

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.