Salome HOME
bos #20558 [CEA 20539][Forum] Universal SALOME distribution and libnss3.so Firefox...
authorvsr <vsr@opencascade.com>
Wed, 20 Jan 2021 15:43:30 +0000 (18:43 +0300)
committervsr <vsr@opencascade.com>
Wed, 20 Jan 2021 15:43:30 +0000 (18:43 +0300)
src/LightApp/LightApp_Application.cxx

index d9379a40acc3b64d9c470d541c307e98ac8985e4..b0d8f7f8fe388a4e77d2e15a8e151fc8183dcbdc 100644 (file)
@@ -1220,12 +1220,17 @@ protected:
   {
     if ( !myBrowser.isEmpty() && !myUrl.isEmpty() )
     {
+      QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
 #ifdef WIN32
       QString cmdLine = QString( "\"%1\" %2 \"%3\"" ).arg( myBrowser, myParameters, myUrl );
 #else
       QString cmdLine = QString( "%1 %2 \"%3\"" ).arg( myBrowser, myParameters, myUrl );
+      // remove LD_LIBRARY_PATH from the environement before starting launcher to avoid bad interactions.
+      // (especially in the case of universal binaries) 
+      env.remove("LD_LIBRARY_PATH");
 #endif
       QProcess* proc = new QProcess();
+      proc->setProcessEnvironment(env);
       proc->start( cmdLine );
       if ( !proc->waitForStarted() )
       {