About this howto

Many programs contains some lines of code that starts the web browser with the application's homepage, open a different program with a generated file or just have a mailto: link in the about dialog box opening the user's preferred mail program with the address of the apoplication programmer.

Doing this while respecting the user's preferences is not as easy as it seems: Perhaps there are three different browsers installed on the system the application runs - which one shall be opened? Just making a list like (if browser cannot be launced: try next browser) will choose the right one for a good part of the users, but you don't get 100% satisfaction.

This howto tries to explain how to launch the preferred program, independent of the operating system or desktop environment.

Note

Always keep in mind that the list of programs you know is incomplete, and tomorrow there will people wanting to use a program that wasn't there at the time of programming. So never rely on a hard-coded list of programs the first way, but try to use the native default application launching system.