Answers to: How can I detach process from a terminal I don't have access to?http://linuxexchange.org/questions/1357/how-can-i-detach-process-from-a-terminal-i-dont-have-access-to<p>I have a server process running in a gnome-terminal at home. I am at work, and I want to detach the process from that terminal and move it to screen without restarting it. Also, I can't use VNC.</p> <p>Is there a way to do this?</p>enSat, 18 Sep 2010 13:04:01 -0400Answer by maszynistahttp://linuxexchange.org/questions/1357/how-can-i-detach-process-from-a-terminal-i-dont-have-access-to/1358<p>About detaching part:</p> <p>stop process (Ctrl+Z)</p> <p>move it to the background (bg)</p> <p>detach it from bash(disown)</p> <p>Move it to <code>screen</code>? Hmm... interesting question :-). I am not aware of easy way to do it. There is an option of attaching to the running process with <code>gdb</code> -> <a href="http://stackoverflow.com/questions/593724/redirect-stderr-stdout-of-a-process-after-its-been-started-using-command-line">redirecting stderr &amp; stdout</a> Maybe it can be accomplished with following steps:</p> <p>1) open <code>screen</code></p> <p>2) find out what is screen output pseudo terminal</p> <p>3) attach to your process with <code>gdb</code></p> <p>4) redirect your process standard output to screen pseudo terminal (using magic in link above, I mean <code>dup2</code> system call and friends)</p>maszynistaSat, 18 Sep 2010 13:04:01 -0400http://linuxexchange.org/questions/1357/how-can-i-detach-process-from-a-terminal-i-dont-have-access-to/1358