WGLMakie.jl in Pluto running on remote machine

I am used to WGLMakie.jl visualizations in Pluto locally, following the instructions in the docs:

using JSServe
Page() # create page in one cell

and then

using WGLMakie

scatter(rand(100), rand(100))

Everything works smoothly. Now I am experimenting with the same workflow when Pluto is running in a remote machine. In particular, I am logged in in a VSCode remote connect session (SSH) where I launch Pluto using its REPL. VSCode automatically forwards the port to my local machine so that I can visualize the Pluto notebook locally even though it is running in the remote machine.

However, the visualization is not working and I wonder if there is any special settings we need to pass to Page in order for it to work? What option should be customized if any?

If someone can try to reproduce the issue, that would help a lot:

  • Use VS Code Remote Connect to login in a remote machine
  • Start a remote Julia REPL in VS Code using the Julia extension
  • Launch Pluto in the remote as usual (import Pluto; Pluto.run())
  • Try to create a plot with the cells above

Have you seen https://makie.juliaplots.org/stable/documentation/remote/#wglmakie?

1 Like

It seems to describe the precise solution to the problem. Will give it a try, thanks! :pray:t4:

1 Like

Worked like a charm. Just need to create a new port (say 8081) on VSCode (it shows this option when Pluto is launched) and then use Page(listen_port=8081). Everything is working now :100:

1 Like