0

I'd like to open a URL in the default internet browser from my application. My application gets compiled for MS-Windows, Linux, Mac and Solaris.

One way to achieve that on Windows is using the shell command start, on Linux using the xdg-open, on Mac there is open. As a bonus, all these commands can also open any file in their default applications.

However I can't find any similar reliable command (or API) on Solaris.

I've heard about sdtwebclient but since it is not on my machine running Solaris 10 (SunOS 5.10), it seems not to be safe to assume that it is usually there.

Any suggestions how to launch the default browser in a (more or less) reliable way on any Solaris machine?

1

sdtwebclient will be installed under /usr/dt/bin if CDE is installed, which limits it to Solaris 10 and older machines.

For Solaris 11 and later, use xdg-open just as you would on Linux.

  • sdtwebclient was in fact at /usr/dt/bin. I was expecting it in the PATH like xdg-open usually is. I have also checked a Solaris 11 machine and you are right: There is xdg-open, but /usr/dt/bin/sdtwebclient is missing. I can work with that. Thanks a lot! – Holger Jan 30 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.