Ttyutils is a suite of UNIX terminal tools, it includes ttyexec, ttylook, ttyadmin, and a few extension programs.
ttyexec executes program in a pseudo terminal, captures all stdandard output from program, passes them to built-in virtual terminal emulator and real terminal, virtual terminal then parse the data, construct a virtual screen in the memory which content was same with the real terminal.
by virtual terminal emulator, a event may be trigger by a specific condition. most conditions was output from program cause content of terminal changed, but hotkey and cursor position event is supported too.
when event trigger, a event hook will be startup, that is a normal program you write, but can access RPC interface provided by ttyexec, for example, get current terminal snapshot.
ttyadmin is a administrator tool, which use ncurses(3X) window interface, view and control exists ttyexec instances.
ttylook similar to BSD watch(1) program, but has fewer limits, and can interact with exists ttyexec instance, snoop on that terminal output, or input data to that terminal if writable mode was enabled.