LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   How can you create/open a browser window from GTK? (https://www.linuxquestions.org/questions/programming-9/how-can-you-create-open-a-browser-window-from-gtk-56819/)

richie-leclair 04-26-2003 01:19 AM

How can you create/open a browser window from GTK?
 
I'm messing with GTK+ 2.0 on RedHat linux at the moment and I need to find out if there is a way to open a standard browser (from a pulldown MenuItem from my toolbar).

Is there tricky programming?

jailbait 04-26-2003 06:25 PM

exec() family of library functions
 
I do not think that there is a Gtk+ call to do what you want. I recommend you use one of the library functions like execl, execlp, etc. This is routine programing.

richie-leclair 04-26-2003 10:03 PM

Found it!
 
Thanks, jailbait. I've found a solution.

I simply use the "system" command. ie,
int system(char *cmd_string) and it works like a charm.

ie. statusbool = system("mozilla http://.....");

Then I can test statusbool for system errors (eg. mozilla didn't exist)

Richie !


All times are GMT -5. The time now is 02:12 PM.