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 Answer 1

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.

1
  • 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! Commented Jan 30, 2019 at 13:28

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.