Home > Archive > Unix Programming > November 2005 > Problem
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
|
| Hi,
I have to write a C program which opens a xterm and automatically
executes another C file from this new terminal. I opened the xterm from
within the C program using
system("xterm");
However, I don't know how to automatically execute another C program in
this terminal. Can somebody suggest something?
| |
| Victor Wagner 2005-11-28, 9:58 pm |
| RG <rashii_g@rediffmail.com> wrote:
: Hi,
: I have to write a C program which opens a xterm and automatically
: executes another C file from this new terminal. I opened the xterm from
: within the C program using
: system("xterm");
: However, I don't know how to automatically execute another C program in
: this terminal. Can somebody suggest something?
system("xterm -e your_otherprogram");
Really there are some other useful command-line options of exterm. You
might like set window title for xterm or specify its size.
1. Read man xterm - there is a lot of useful information there
2. Try to do it by hand, starting new xterm from command line, typing
commands in the shell manually.
3. When command satisfies you, cut'n'paste it into your code from your
shell history
--
| |
| Robert Harris 2005-11-28, 9:58 pm |
| RG wrote:
> Hi,
>
> I have to write a C program which opens a xterm and automatically
> executes another C file from this new terminal. I opened the xterm from
> within the C program using
>
> system("xterm");
>
> However, I don't know how to automatically execute another C program in
> this terminal. Can somebody suggest something?
>
If you call
system("xterm top");
then you will automatically execute "top" in your xterm. Is that an
example of what you want?
"man xterm" will tell you about it.
Robert
| |
|
|
|
|
|