There really isn’t a standard way to do this in Linux… I believe GNOME and KDE have their own solutions, based on the mime types of the files to be opened. But just “opening” a filename is not going to work on any Linux platform.
In general you do not know what applications a user has installed at all, so it’s probably best to let him choose an application to open a file with as is done in mozilla…
A much more cross platform solution is to remember file-type associations (i.e. a file extension/mime-type mapping to a commandline string such as “mozilla %s” where %s is replaced by the filename you want to open; note that this allows nontrivial constructs where the filename is NOT the last thing on the commandline, and in general in unix you could even construct pipes eg “a2ps %s | lpr”). Obviously then you need a way of knowing what mime-type something has if you don’t have an extension, but I guess you generally know that if it’s data from your own solution.
Another reason to do it this way is that Servoy runs on SOOO many platforms that you can’t enumerate them all… Once you’ve fixed the problem for Linux, by some strange Linuxism, you’ll have to fix it for Solaris, or FreeBSD, or etc…
OK Sebastiaan, thanks! I work with kde and, based on file extensions a file does get fired with the appropriate application. But I will do this ‘on request’. Makes it easier…