Re: how to show the content of xterm in a gtk window

On Thu, 2003-04-17 at 01:11, Ng Sio Lei wrote:
> hi, i want to build a gtk window to show the status such as warnings,
> error or etc, of a running software. they are originally shown in xterm.

You should create a pipe and fork, running the application to watch as a
child, redirecting standard I/O of the new process to the pipe. The are
few similar ways to do this and since it's a standard unix programming
technique you should find examples on the web. Then you can use to  


or similar to what the pipes. When something arrives, you callback is
called and you can read data and append it to your text buffer.


Maurizio Umberto Puxeddu.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]