I’m running Ubuntu 20.04 on WSL. I succesfully compile the CylinderExample, and get the following errors at runtime.
2021-06-04 19:05:43.417 ( 0.009s) [ A4169740]vtkXOpenGLRenderWindow.:251 ERR| vtkXOpenGLRenderWindow (0x55ef95e7e380): Could not find a decent config
2021-06-04 19:05:43.417 ( 0.009s) [ A4169740]vtkXOpenGLRenderWindow.:468 ERR| vtkXOpenGLRenderWindow (0x55ef95e7e380): Could not find a decent visual
You’ll need to install an xserver before you can run graphical programs in WSL.
There are instructions on the internet on how to do that.
Not that the installed server uses software rendering so they will be slower than using your graphics card.
Note that you can run VTK directly on Windows though.
I’m very doubtful that Xming has sufficient OpenGL capabilities for VTK applications. What version of OpenGL does it show when you run glxinfo? It should report something like this:
If anyone has specific instructions/experience successfully running ParaView/VTK with WSL, I would be very interested - it would avoid dual-boot with linux headaches.
I just tried running paraview within xvfb, and it seems to run perfectly (this is on an actual linux box, not WSL, but that shouldn’t make a difference). Using xvfb to run glxinfo gives me the following, which shows the capabilities of the software OpenGL renderer that xfvb uses:
server glx version string: 1.2
client glx version string: 1.4
GLX version: 1.2
Max core profile version: 4.5
Max compat profile version: 3.1
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.2
OpenGL version string: 3.1 Mesa 20.2.6
OpenGL shading language version string: 1.40
XServer’s definitely the way to go for GUI right now. But Microsoft is working on GPU and GUI support for WSL 2.0! I believe it’s in their insider program still. Would be very interested in seeing VTK work on there. Also seeing it with EGL for headless.
No, I’m pretty sure that you do need vnc. Because if you use xvfb to create a local xserver like in my paraview example above, then you still need some way to view the xvfb framebuffer. That’s where vnc comes in.
It’s possible to run a full X session inside xvfb, which will give you a complete linux desktop that you can connect to via vnc.