How to open the default web browser from in C?


We're planning on switching to using HTML help for some of our software ...but I don't know how to open a web browser from within an application. Here's the particulars and the challenge:

We program entirely in C, using GTK+, and release linux AND Windoze releases. Currently, the Linux side opens a window with help text in it (no active links!!) and on the Windoze side, we use the MS help system (compiled help files, .chm etc).

I assume that opening a browser from a Windoze app isn't so hard ...the default browser is probably available from the registry and no big deal to find and then make a system call.

For Linux however, noting that we use RedHat, Ubuntu, Suze, and CentOS, I don't know how to determine what the default web browser (and path) so I can call it with a system call... Anyone? I know that one option is to use a layout engine like GtkHTML, but we'd really like to just call a web browser instead...


One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix