I'm writing a C++ program in which I want to open the user's default browser. For Linux, I found that I can use the xdg-open command. I am, however, not certain if xdg-open is by default available on all Linux distro's. Could anyone shed some light on this?
If there is a better alternative I'd like to hear it as well!
Thanks!
xdg-open is part of the freedesktop.org suite and is, as far as I know, available to any reasonably generic desktop distribution.
That being said, you can't count on it being available on Android (though that runs a linux kernel, and thus is a linux), on something that just displays things on a framebuffer (older navigation systems / HMIs), something that comes without a desktop manager (some kiosk type devices) and of course extremely slimmed down things.
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