Hi everyone.
I need to make some 3D plots for which I cannot use Cairomakie. My local machine is a windows computer to which I connect via vscode-ssh to a linux computer.
I would be happy to just generate a png with either WGLMakie or GLMakie, although it also would be nice to makie interactivity work. Likewise, if anyone knows how to make it work with either vscode or basic ssh in the shell that would be very helpful (ultimately, I want to use vscode)
My problem manifests in the following way:
WGLMakie: Everything seems to work fine until I try to display, or save a figure. Then the REPL hangs for a while and after 1 minute or so it errors with
ERROR: Can't get three: Screen Session uninitialized. Not yet displayed? Session status: CLOSED, id: c4d32250-d752-4496-9306-13ef9e9533d6
Waiting for plot to be initialized in display
I suppose it needs to be able to render something in order to save it but I can’t make it work. In the docs, I only find the following:
If you want to use WGLMakie in VS Code on a remote server, you will have to forward the port used by WGLMakie in order for the plot pane integration to work. If you don’t need to change the port, you will just have to forward the 9384 port.
I have done that, but it doesn’t seem to do anything. It seems one can also use Bonito.jl to change the port. I tried to do that as well but also with no effect: Neither saving works nor displaying in the browser or vscode pane.
GLMakie: Here, I also have some similar issues. I can run ssh with x11 forwarding.
Failed to precompile GLMakie [e9467ef8-e4e7-5192-8a1a-b1aee30e663a] to “/storage/niggeni/.julia_aquana/compiled/v1.10/GLMakie/jl_XUFhA4”.
┌ Warning: OpenGL/GLFW wasn’t loaded correctly or couldn’t be initialized.
│ This likely means, you’re on a headless server without having OpenGL support setup correctly.
│ Have a look at the troubleshooting section in the readme:
│ Makie.jl/GLMakie at master · MakieOrg/Makie.jl · GitHub.
â”” @ GLMakie ~/.julia/packages/GLMakie/fj8mE/src/gl_backend.jl:4
ERROR: LoadError: InitError: Exception[GLFW.GLFWError(65550, “X11: Failed to open display localhost:16.0”), ErrorException(“glfwInit failed”)]
This indicates that I still need to set up OpenGL properly, but I am not sure what exactly I am missing. FWIW: If I run GLMakie locally, it seems to work. It also works if I use another linux machine to connect to the server.
Does anyone have experience in setting up either WGLMakie or GLMakie with a remote connection and could help me?