Send output of C-Program to X-Term ?

Send output of C-Program to X-Term ?

Post by Andreas Gloe » Wed, 01 Sep 1993 19:02:11



I have a C-Program running under Unix which has some outputs. These outputs
should be redirected to another Xterm which has to be started too.

I tried several possible solutions :
Using cat of a named pipe...
        mknod("/tmp/replication.cat",S_IFIFO,NULL);
        system("/usr/bin/X11/xterm -e cat -s /tmp/replication.cat &");

        and then writing into this file. The problem was that the xterm is
        going to be closed when I stop writing (not when I close the file)

Using tail
        system("/usr/bin/X11/xterm -e tail -f /tmp/replication.cat &");

        and writing into the file. Here all works fine, but I got problems
        that it only works when I write a lot of characters to the file. (buffer)
        When I only write a small number (~ < 20000 characters) the
        started xterm was also closed and no output appears. Another problem
        is, that not all the lines of the file will be shown.....
        I tried the parameter +c0 of the tail command, but the effect was
        that the xterm was started and closed at once.

Does anyone has a solution for this problem ?

Just send a mail, and thank you for your efforts to help me....

-----------------------------------------------------------------------------
                Andreas Gloege
        smail : Limesstr.28a, 81243 Muenchen, Germany, 089/870436

-----------------------------------------------------------------------------

 
 
 

1. Can I use xdm with a PC-Based X-Term program?

I'm runningan evaluation copy of Omni-X from xlink.com. It looks to be really
excellent software, and xterm runs fine. However, I'd like a little more
flexability...

Now, I'm wondering how I can use xdm with a PC based X-Term emulator, so I get
the 'desktop' insted of just the xterm..

Does anyone have such a thing running.

cheers
Bob
--
Support Whirled Peas.      Business in China?          China House

2. How to install, from the start?

3. Smart-term vs. x-term

4. Sendmail Compilation Problem

5. getting suid program to output to user's term

6. chmod for partitions

7. TERM: best way to send/receive mail over term?

8. X Windows & a Server computer

9. Help: Connect HP 700RX x-term to Linux PC

10. Configuring RH5.2 /w XF3.3.3 as a X-term?

11. I can't start x-term in x

12. Linux as X-Term, problems with mouse

13. Q: How can I run 2 X-term in 1 machine