「失われた」画面セッションを回復する方法は?

「失われた」画面セッションを回復する方法は?

どういうわけか、画面に「通知されずに」画面ウィンドウを閉じたため、セッションはまだ表示されていますattached。これにより、このセッションに再接続できなくなります。どうですか?

me@iupr-serv8:~$ screen -r
There are several suitable screens on:
    25028.pts-19.XXX-serv8  (01/05/2012 07:15:34 PM)    (Attached)
    24658.pts-19.XXX-serv8  (01/05/2012 07:11:38 PM)    (Detached)
    24509.pts-19.XXX-serv8  (01/05/2012 07:10:00 PM)    (Detached)
    18676.pts-5.XXX-serv8   (01/02/2012 06:55:33 PM)    (Attached)
Type "screen [-d] -r [pid.]tty.host" to resume one of them.
me@XXX-serv8:~$ screen -r 25028
There is a screen on:
    25028.pts-19.XXX-serv8  (01/05/2012 07:15:33 PM)    (Attached)
There is no screen to be resumed matching 25028.

【書き直す】

最後に、セッションが失われたのではなく、最初のセッションのIDがあることがわかりました0。 2番目のセッションのIDはです1

ベストアンサー1

まずを使って分離してみてくださいscreen -d。それでも機能しない場合は、昇順で試してみてください。強調する

   -d|-D [pid.tty.host]
        does  not  start screen, but detaches the elsewhere running screen session. It has the
        same effect as typing "C-a d" from screen's controlling terminal. -D is the equivalent
        to  the  power  detach key.  If no session can be detached, this option is ignored. In
        combination with the -r/-R option more powerful effects can be achieved:

   -d -r   Reattach a session and if necessary detach it first.

   -d -R   Reattach a session and if necessary detach or even create it first.

   -d -RR  Reattach a session and if necessary detach or create it. Use the first  session  if
           more than one session is available.

   -D -r   Reattach a session. If necessary detach and logout remotely first.

   -D -R   Attach  here and now. In detail this means: If a session is running, then reattach.
           If necessary detach and logout remotely first.  If it was not running create it and
           notify the user. This is the author's favorite.

   -D -RR  Attach here and now. Whatever that means, just do it.

おすすめ記事