Is there a convenient library call that allows me to open the default browser that I can use from C? I poked around in glib and didn't see anything. There is xdg-open, and I can just system that I guess. Any better ideas?
Since you tagged this question with "glib", the right solution is probably to use g_app_info_launch_default_for_uri (or one of the other GAppInfo methods, depending on your exact use case).
If it is installed then xdg-open
would work.
xdg-open http://www.stackoverflow.com
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With