diff --git a/etc/controlDict b/etc/controlDict index e1af08c7ae..891e010e0c 100644 --- a/etc/controlDict +++ b/etc/controlDict @@ -18,7 +18,7 @@ FoamFile Documentation { - docBrowser "kde-open %f"; + docBrowser "firefox %f"; doxyDocDirs ( "$WM_PROJECT_USER_DIR/html" diff --git a/src/OpenFOAM/global/argList/argList.C b/src/OpenFOAM/global/argList/argList.C index 287dc9efcc..82c6ff47c9 100644 --- a/src/OpenFOAM/global/argList/argList.C +++ b/src/OpenFOAM/global/argList/argList.C @@ -881,7 +881,12 @@ void Foam::argList::displayDoc(bool source) const if (found) { - string docBrowser(docDict.lookup("docBrowser")); + string docBrowser = getEnv("FOAM_DOC_BROWSER"); + if (docBrowser.empty()) + { + docDict.lookup("docBrowser") >> docBrowser; + } + // can use FOAM_DOC_BROWSER='application file://%f' if required docBrowser.replaceAll("%f", docFile); Info<< "Show documentation: " << docBrowser.c_str() << endl; diff --git a/src/OpenFOAM/global/argList/argList.H b/src/OpenFOAM/global/argList/argList.H index c36955d5ce..85b2e26b57 100644 --- a/src/OpenFOAM/global/argList/argList.H +++ b/src/OpenFOAM/global/argList/argList.H @@ -37,7 +37,7 @@ Description @verbatim ( "file1.txt" "file2.txt" ... "fileN.txt" ) @endverbatim - The backslash-escaping has been used to avoid shell expansions. + The backslash-escaping is required to avoid interpretation by the shell. @par Default command-line options @param -case \