On 1/11/07, Douglas Tutty <dtutty@porchlight.ca> wrote:
On Thu, Jan 11, 2007 at 07:22:05PM -0500, Nelson Castillo wrote: > >Note: I'm not trying to migrate a process from one machine to another, > >just the program's stdin, stdout, stderr from a VC to a ssh. > > Perhaps you should use GNU Screen instead. It will change your life :P > I thought screen was a way to get many virtual-virtual terminals from within one (virtual) terminal.
Not only that.
Can you exit a screen session, log in another way and get it back with all the programs still running?
Yes. With "Ctrl a d" you detach the screen session. Then "screen -r" will get it back. It will work also if you accidentally close a SSH session. You will be able to get back what you had been running. You might need to detach it first if the system hasn't killed the ssh session yet -- "screen -dr". One feature that is very useful is to have more than one user see the same session. It's useful when you want to help someone configure/debug something and she gives you access to her server. It's "screen -x". With that, you can have the terminals in more than one PC at the same time (logged in with the same user ... I think there are better permissions for that but I haven't used them). I like to use it and chat starting lines with #. n@plinko:~/svn$ cd fuwiki n@plinko:~/svn/fuwiki$ # let's do an update n@plinko:~/svn/fuwiki$ svn update At revision 10092. n@plinko:~/svn/fuwiki$ # Nothing new... catch you later. n@plinko:~/svn/fuwiki$ # Ok. See you... It helps a lot. It's better than using IM and guess what someone else's terminal is showing (or have her describe what she got). You might want to use "screen -A" to start a Screen session. Regards. -- http://arhuaco.org http://emQbit.com