From: Christophe Bourcier Date: Mon, 21 Dec 2020 12:38:53 +0000 (+0100) Subject: Launch the web browser in a clean environment to be able to launch firefox from unive... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e81ba5243ac44ea175500e447c1808beddc6eb09;p=modules%2Fgui.git Launch the web browser in a clean environment to be able to launch firefox from universal binaries --- diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 1aa01cf53..efa47c001 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -1206,12 +1206,16 @@ protected: { if ( !myBrowser.isEmpty() && !myUrl.isEmpty() ) { + QProcess* proc = new QProcess(); #ifdef WIN32 QString cmdLine = QString( "\"%1\" %2 \"%3\"" ).arg( myBrowser, myParameters, myUrl ); #else QString cmdLine = QString( "%1 %2 \"%3\"" ).arg( myBrowser, myParameters, myUrl ); + // unset LD_LIBRARY_PATH to launch the web browser in a clean environment + QProcessEnvironment env = QProcessEnvironment::systemEnvironment(); + env.insert("LD_LIBRARY_PATH", ""); + proc->setProcessEnvironment(env); #endif - QProcess* proc = new QProcess(); proc->start( cmdLine ); if ( !proc->waitForStarted() ) {