Glam Prestige Journal

Bright entertainment trends with youth appeal.

I typically log into my Linux box from my Windows laptop using PuTTY and run screen there. When my corporate overlords decided to update my laptop to Windows 7 my PuTTY sessions have been freezing. I typically kill the PuTTY session and then either reattach the screen session (if it detached) or issue a "-d -r" if the screen session didn't detach when my PuTTY session froze up.

My problem is that I have a screen session that, at first, refused to detach. I'd use:

screen -d -r 6313.sessionName

but the command would just hang there.

I found that in the /var/run/screen// directory were "files" corresponding to each of my screen sessions. I noticed that the stubborn one had 700 permissions on it while the others (which were detached) had 600 permissions.

So I changed the permissions on that file to 600. Screen now lists it as "detached". However when I try to reattach to it the command, once again, just hangs there.

Using

ps aux | grep 6313

shows the process state as "Ss", which means it's in an interruptable sleep state. This is no different than any of the other detached screen sessions which show the same process status.

I'm at a loss as to how to recover this session. Any suggestions?

11

2 Answers

When I use screencommand, I usually open the socket like this:

$ screen -S <SOCKET_NAME>

and when I want to attach or reattach I use:

$ screen -x <SOCKET_NAME>
5

To detach a screen session, you should use Ctrl+A+D. Then, to reattach the session, use screen -r <pid>. If you want to connect to a screen session that is in use, then you would use screen -dr <pid> to first detach, then reattach, the screen session.

3

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