badcode
badcode

Reputation: 610

bad X server connection -" windows 10 + wsl"

I get the following error when I try to run a tutorial code with vs code on a wsl. I mean,i am using vs code on windows 10 but my all builds system are on wsl ubuntu. To explain it briefly, I want to display 3d image on the screen.

ERROR: In /build/vtk6-VHOYAG/vtk6-6.3.0+dfsg1/Rendering/OpenGL/vtkXOpenGLRenderWindow.cxx, line 1475
vtkXOpenGLRenderWindow (0x7fffca1a12a0): bad X server connection. DISPLAY=Aborted (core dumped) 

I'm not familiar with linux systems but i think, i need a permission to rendering. Do you know how to display the images?

Upvotes: 2

Views: 1767

Answers (1)

badcode
badcode

Reputation: 610

SOLVED: If you want to run a graphical program on wls you need an X server that runs on Windows 10. You can use Xming to get outputs from wsl 2.

Upvotes: 2

Related Questions