Here's what I use: {$IFDEF LINUX} function SearchForBrowser(const BrowserFileName : string) : string; {Search path for specified browser file name, returning its expanded file name that includes path to it.} begin Result := SearchFileInPath(BrowserFileName, '', GetEnvironmentVariable ('PATH'), PathSeparator, [sffDontSearchInBasePath]); end;
function GetBrowserPath : string; {Return path to first browser found.} begin Result := SearchForBrowser('firefox'); if Result = '' then Result := SearchForBrowser('konqueror'); {KDE browser} if Result = '' then Result := SearchForBrowser('epiphany'); {GNOME browser} if Result = '' then Result := SearchForBrowser('mozilla'); if Result = '' then Result := SearchForBrowser('opera'); end; {$ENDIF} You can use Shell(GetBrowserPath + ' ' + URL) although some frown on that since Shell is deprecated, but I still use it. With OS X, it's very easy: Shell('Open ' + URL) -- this will open the URL in the default browser, so no need to search for it and in fact you don't want to search for it. Thanks. -Phil _______________________________________________ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus