I need to hook onto output of currently running terminal (tty1) from virtual terminal and capture it (running X server).
Terminal TTY – How to Hook on to One Terminal’s Output from Another Terminal
terminalterminal-emulatortty
terminalterminal-emulatortty
I need to hook onto output of currently running terminal (tty1) from virtual terminal and capture it (running X server).
Best Answer
I came across this one tool called
ttylog
. It's a Perl program available on CPAN here. It has a couple caveats, one being that I could only figure out how to attach to a terminal that was created as part of someone ssh'ing into my box. The other being that you have to run it with elevated privileges (i.e. root or sudo).But it works!
For example
First ssh into your box in TERM#1:
Note this new terminal's tty:
Now in another terminal (TERM#2) run this command:
Now go back to TERM#1 and type stuff, it'll show up in TERM#2.
All the commands I tried, (top, ls, etc.) worked without incident using
ttylog
.