Tag Info

Hot answers tagged

9

Sure, with screen -d -r You can choose which screen to detach and reattach as usual by finding the pid (or complete name) with screen -list. screen -d -r 12345


7

You should be creating screens with names. $ screen -S foo $ screen -list There are screens on: 16994.foo (03/30/15 14:05:13) (Detached) 20082.q (12/17/14 18:06:44) (Detached) 11008.w (11/12/14 10:52:43) (Detached) 1199.irc (11/12/14 01:34:40) (Detached) Then you can reattach screens with $ ...


4

The parent process id (ppid) of a process cannot be changed outside of the kernel; there is no setppid system call. The kernel will only change the ppid to (pid) 1 after the processes parent has terminated - if the process did not respond to a signal that the parent was terminated. For this to happen, the process needs to have ignored various signals ...


3

You can check this or better you can check man page for screen which is a good reference and says: backtick id lifespan autorefresh cmd args... backtick id Program the backtick command with the numerical id id. The output of such a command is used for substitution of the "%`" string escape. The specified lifespan is the number of seconds the ...


2

Following a comment suggested in the post I used: screen -x <session id> From the man page: screen -x -x Attach to a not detached screen session. (Multi display mode). Screen refuses to attach from within itself. But when cascading multiple screens, loops are not detected; take care. Also researching a bit I discovered other uses for ...


1

screen sessions are not killed/terminated when the attaching terminal goes away. They are detached just as if you had detached manually (using Ctrl-a d, probably). That's part of the point of screen. The disappearance of your screen session is due to some other reason. Perhaps the shell running inside the screen exited on its own or the server got rebooted ...


1

I have a python script that keeps track of numerous detached screen sessions and captures output from each (when utilization commands like free, top -bn2, iostat are periodically sent via 'stuff'). Instead of redirecting to a file and, thus, managing at least one file per detached screen session... I simply redirect to whatever tty/pts my parent session is ...



Only top voted, non community-wiki answers of a minimum length are eligible