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...
Getting Started with DevOps - Including New Data on IT Performance from Puppet Labs 2015 State of DevOps Report
August 27, 2015
12:00 PM CDT
DevOps represents a profound change from the way most IT departments have traditionally worked: from siloed teams and high-anxiety releases to everyone collaborating on uneventful and more frequent releases of higher-quality code. It doesn't matter how large or small an organization is, or even whether it's historically slow moving or risk averse — there are ways to adopt DevOps sanely, and get measurable results in just weeks.
Free to Linux Journal readers.Register Now!
- August 2015 Issue of Linux Journal: Programming
- Hacking a Safe with Bash
- Django Models and Migrations
- Secure Server Deployments in Hostile Territory, Part II
- The Controversy Behind Canonical's Intellectual Property Policy
- Huge Package Overhaul for Debian and Ubuntu
- Shashlik - a Tasty New Android Simulator
- Embed Linux in Monitoring and Control Systems
- KDE Reveals Plasma Mobile
- diff -u: What's New in Kernel Development