[Paraview-developers] detecting X display
Utkarsh Ayachit
utkarsh.ayachit at kitware.com
Fri Sep 19 08:34:11 EDT 2014
Jean,
Can you try the attached patch and see if the output on the
server-side has any useful information that could help diagnose this?
Thanks,
Utkarsh
On Fri, Sep 19, 2014 at 5:33 AM, Favre Jean <jfavre at cscs.ch> wrote:
> After checking out the latest changes, my server-side rendering on the Cray does not work anymore because the DISPLAY is not correctly identified.
>
> Error message is:
>
> "Display is not accessible on the server side.
> Remote rendering will be disabled."
>
> I reverted to a tag just before the fix to detect X
>
> ad33f7548abf4b0b643e2ed15dd9ba1f8690c04f
>
> and got everything working again.
>
> P.S. I use hardware-rendering and specifically start X servers and set DISPLAYs to :0 for every job.
> -----------------
> Jean
> _______________________________________________
> Paraview-developers mailing list
> Paraview-developers at paraview.org
> http://public.kitware.com/mailman/listinfo/paraview-developers
-------------- next part --------------
diff --git a/ParaViewCore/ClientServerCore/Core/vtkProcessModule.cxx b/ParaViewCore/ClientServerCore/Core/vtkProcessModule.cxx
index 3575fcf..cbf0c75 100644
--- a/ParaViewCore/ClientServerCore/Core/vtkProcessModule.cxx
+++ b/ParaViewCore/ClientServerCore/Core/vtkProcessModule.cxx
@@ -178,6 +178,7 @@ bool vtkProcessModule::Initialize(ProcessTypes type, int &argc, char** &argv)
{
char *displayenv = new char[strlen(argv[i+1]) + 10];
sprintf(displayenv, "DISPLAY=%s", argv[i+1]);
+ vtkGenericWarningMacro("Setting display from command line args as: " << displayenv);
vtksys::SystemTools::PutEnv(displayenv);
delete [] displayenv;
// safe to delete since PutEnv keeps a copy of the string.
diff --git a/ParaViewCore/ClientServerCore/Rendering/vtkPVDisplayInformation.cxx b/ParaViewCore/ClientServerCore/Rendering/vtkPVDisplayInformation.cxx
index a9a2a00..1011034 100644
--- a/ParaViewCore/ClientServerCore/Rendering/vtkPVDisplayInformation.cxx
+++ b/ParaViewCore/ClientServerCore/Rendering/vtkPVDisplayInformation.cxx
@@ -19,7 +19,7 @@
#include "vtkPVOptions.h"
#include "vtkProcessModule.h"
#include "vtkToolkits.h"
-
+#include "vtksys/SystemTools.hxx"
#include "vtkRenderingOpenGLConfigure.h" // needed for VTK_USE_X
#if defined(VTK_USE_X)
# include <X11/Xlib.h>
@@ -50,15 +50,18 @@ void vtkPVDisplayInformation::PrintSelf(ostream& os, vtkIndent indent)
bool vtkPVDisplayInformation::CanOpenDisplayLocally()
{
#if defined(VTK_USE_X)
+ vtkWarningMacro("Testing DISPLAY=" << vtksys::SystemTools::GetEnv("DISPLAY"));
Display* dId = XOpenDisplay((char *)NULL);
if (dId)
{
+ vtkWarningMacro("Success");
XCloseDisplay(dId);
return true;
}
+ vtkWarningMacro("Failed");
return false;
#endif
-
+ vtkWarningMacro("Success by default");
return true;
}
More information about the Paraview-developers
mailing list