125

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])

1 Answer 1

192

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
  • 3
    Why not use -x?
    – Alex78191
    Commented Dec 10, 2017 at 12:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .