How to use vtk to display the figures on my computer from a remote server?

Hello, I’m using vscode with Remote X11 extension and mobaXterm to connect the linux server and display the figures on my computer.
It works well when I use the functions like matplotlib.pyplot.imshow().
But when I use the functions like mayavi.mlab.figure() or mayavi.mlab.points3d(), it can not work properly with the error:


It seems there are some problems with the vtk and the OpenGL.

Later I’m told that X11 and mobaXterm are not supported by vtk, so I’d like to ask how to use vtk to display the figures on my computer from a remote server. Better if it works with vscode. Thanks a lot.

Yes, you can search for X forwarding OpenGL for many discussions on this topic.

Possible solutions include turbovnc + virtualgl or nomachine.
These will allow you to run opengl programs from a remote machine.

Dan

Thanks a lot, I’ll try searching.

Not sure what solution involving WSL you are referring to.

turbovnc can be tunneled through ssh.
https://rawcdn.githack.com/TurboVNC/turbovnc/2.2.7/doc/index.html#hd006001

nomachine has its own protocol which is encrypted.
For the free nomachine version only one user can connect to the server, I think they have a paid version where several users can connect to the server.
For turbovnc+virtualgl you can have several users connecting to the server.

Seems nomachine supports ssh as well
https://knowledgebase.nomachine.com/AR04S01121#:~:text=NoMachine%20provides%20its%20own%20web,supported%20from%20TLS%201.2%20ongoing.