Re: application run on button click



Am Fre, 2001-11-02 um 14.30 schrieb neeraj sharma:
Sir,
    I am working on gtk and I want to run an already
created application from my program on button click.I
am unable to find any solution till now.Please help me
as it is very important.
                                   Regards
                               Neeraj

If you just want to run your program, use the system() function
(attention: this function will not return while the program it called is
running).
If you need to "communicate" with your program, or don't want your
program to be "blocked", then use pipe() (if you want to communicate
with your program), fork() and the exec()-family.

In case your app is a gnome app, it's a lot easier: use the
gnome_execute-family
(http://developer.gnome.org/doc/API/libgnome/gnome-gnome-exec.html)

Hope I have helped,
Jörgen

-- 
There are two major products that come from Berkeley : LSD and UNIX. We
don't believe this to be a coincidence.

Jeremy S. Anderson




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