Screen
From Luke Jackson
Revision as of 00:23, 23 December 2007 (edit) Ljackson (Talk | contribs) ← Previous diff |
Revision as of 00:24, 23 December 2007 (edit) Ljackson (Talk | contribs) (→Why can't I re-attach to my session after a lost connection?) Next diff → |
||
Line 27: | Line 27: | ||
(In the above example, the dead screen isn't causing problems, but you should probably enter the screen -wipe command to get rid of it.) | (In the above example, the dead screen isn't causing problems, but you should probably enter the screen -wipe command to get rid of it.) | ||
- | [Category:Linux] | + | [[Category:Linux]] |
Revision as of 00:24, 23 December 2007
Why can't I re-attach to my session after a lost connection?
In some cases, your previous screen session may not have detached properly when you lost your connection. If this happens, you can detach your session manually.
To see your existing screen sessions, enter:
screen -list
This will display a list of your current screen sessions. For instance, if you had one attached and one dead screen, you would see:
There are screens on:
25542.pts-28.hostname (Dead ???) 1636.pts-21.hostname (Attached)
Remove dead screens with 'screen -wipe'. 2 Sockets in /tmp/screens/S-username.
To detach an attached screen, enter:
screen -D
If you have more than one attached screen, you can specify a particular screen to detach. For example, to detach the screen in the above example, you would enter:
screen -D 1636.pts-21.hostname
Once you've done this, you can resume the screen by entering the screen -r command.
(In the above example, the dead screen isn't causing problems, but you should probably enter the screen -wipe command to get rid of it.)