]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Launch the web browser in a clean environment to be able to launch firefox from unive... cbr/launch_web_browser_in_clean_environment
authorChristophe Bourcier <christophe.bourcier@cea.fr>
Mon, 21 Dec 2020 12:38:53 +0000 (13:38 +0100)
committerChristophe Bourcier <christophe.bourcier@cea.fr>
Mon, 21 Dec 2020 12:38:53 +0000 (13:38 +0100)
src/LightApp/LightApp_Application.cxx

index 1aa01cf53bf075d186cc28c3843646a311ebe0a4..efa47c00124adf67accae4770f5465d413fb3577 100644 (file)
@@ -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() )
       {