View Single Post
  #2   (View Single Post)  
Old 23rd April 2009
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Default

Generally, you don't.

It's possible to write to another terminal, if you open a pair of xterms and run 'tty', on the first you can generate output (e.g. echo hi) and redirect it (>>) to the second terminals tty device file. Fiddling around like that is basically what the unix talk program does. So you could even have the script redirect the I/O of a command to another termianl; but in order to *actually* execute a program on the other terminal, you would have to setup a program on that terminal to handle the launching, and a way to communicate with it from your current terminal (e.g. through a named pipe or socket)

You probably do not want to do exactly what you asked how to do.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.
Reply With Quote