Re: How to display the messages from xterm to the GTK+ windows?



On Sat, 03 May 2003 13:43:20 +0800, =?big5?q?Rui=20Cheang?= said:
> Hi all,
> Now i am going to build a small project, i hope to
> display the message (error/warmings) from the xterm to
> the GTK+ windows.  It is used to show the warmings
> when i process something. Anyone knows? Please tell

When you process something, the "normal" output is sent to wherever
the process's "stdout" (standard output) is routed, and errors/warning
are sent to "stderr" (standard error).  If you happen to be running a
shell in an xterm, stdout and stderr end up being directed to the "terminal",
which is then displayed by xterm.  Of course, pipes | and redirection > >>
and friends can change where stdout and stderr are sent.

For GTK, you want to use a sub-process to run your program, and use
pipes to capture the stdout/stderr of the process.

Attachment: pgpwuL8QfBNIA.pgp
Description: PGP signature



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