views:

52

answers:

2

I've got two terminal instances/processes opened with different PID.

Is it possible to from one of them, hook up into the other so when I type something and it outputs something, then the other terminal will see the output too (maybe the input too if possible?).

Just like cloning the terminals.

I want this because then I can hook up some SSH processes and everyone connected to the machine could see what the other one is doing and could also collaborate.

I don't want to use any GUI or other workarounds for this.

Want it to be in process level.

I'm using Ruby and Ubuntu.

+1  A: 

Go hack the kernel.

But if you need a practical workarou^Wsolution, I'd advise using screen.

Roman Cheplyaka
This was a good workaround. Read my comment beneath the second answer. Do you know a solution to that one?
never_had_a_name
+2  A: 

Install GNU Screen, run screen in the first terminal, then screen -x in the second.

(This works for both input and output).

caf
I have a file with commands I have to run after I have executed "screen -x". But I cannot run the file after the "screen -x" row because then the file will be run AFTER I have terminated the screen with "exit". Is there a way to run this file INSIDE screen so my other screen is seeing all the command outputs too?
never_had_a_name
you run screen then "kill the terminal window" (this leaves screen running)
rogerdpack