On my office computer (running Scientific Linux 6.3) I have several windows running some processes in separate terminal emulators (/dev/pts/). I often connect to my office computer with iSSH from my iPad, but I can only see the results of the programs that have been written to a file and can't see what each terminal is showing or control the terminals.I want to be able to temporarily switch control of a terminal to my iPad iSSH terminal, look at the results, run new commands (on my office terminal from my iPad) then let the program run on my office computer and return back to my iSSH terminal, so I can check other terminals or simply quit. Since I use 3G most of the time to connect with my iPad I don't want to use any graphically depenent method which will be very slow.As far as I have understood, something like reptyr seems to permanently move control of a process from one terminal to another, I haven't seen any one talk (or ask) about giving control back to the original terminal. I want to return it back to it's original terminal after I finish. I would really appreciate any suggestions or help. Thanks in advance
Temporarily controlling a shell
ssh
I believe you need just to run the original commands inside a screen session.Then you can disconnect from it (screen keeps on runnign and keep your virtual terminal displayed correctly), and re-attach to it from another session (ie, from your ipad, or from another computer, or from the same computer when you get back to it). There are many more things screen can do too (such as, for example, allow a co-worker to sneak to your running screen session as you use it, or when you are away from it, allowing to have several persons peeking at the same terminal)in a nutshell:on your primary terminal, on host A, as user ORIGINALUSER:screencommand (ex: vi /tmp/file)CTRL+a d # which is 'CTRL' and 'a' at the same time, and then 'd'. This will 'd'etach from the screen session, while screen itself still runs! (and inside it the commands, shell and any still running invoked command, still run)on another terminal (or the same one) :#log in the original machine (host A) as the same user ORIGINALUSER, and then:screen -r   #will reattach to the latest running screen from that user. If there is more than one screen to reattach to, see the screen man page or on the net. (usefull too if you can't reattach : there are ways to force it to reattach)Once really finished : you just exit the shell running inside the screen. This will terminate the screen command too.while in screen: ctrl+A is special, and allows to send commands to screen. Try : ctrl+A ?