I am developing in a remote server. I am connected to the server from my local machine via SSH. To enable X11 forwarding, I connect using the
-Y option (i.e.,
ssh -Y). This allows me to use the GUI interface of the app running on the remote server; for example, if I start MATLAB form the terminal connected to the remote server, the MATLAB GUI shows up in an X-window.
Now, in the same environment, I’m not sure how to display Makie plots. An example script I run is
fig[1,1] = Axis(fig)
xs = range(0, 2π, length=100)
but the last line just returns
Figure() without showing any figure; it does not even open an X window.
Is there a way to plot Makie figures from Julia running on the terminal connected to a remote server?
Maybe with GLMakie? CairoMakie doesn’t have windows, it mostly outputs pngs or svgs to plot panes or other compatible displays on the stack.
Maybe ElectronDisplay.jl? Just a guess, never used it with X11 forwarding.
Is displaying the figure in the terminal an option ? If your terminal supports them, you can use
Sixels and get decent results.
EDIT: wrong quote
Yes, worked. Just tried it, had to install some missing libraries for CentOS, but after 1-2 hours it shows CairoMakie plots in an electron display via X on a Windows 10 desktop (XServer Xming).
Before I started I made sure to open a xterm to be sure that X system is doing as expected.
The above mentioned library are not needed for xterm, but for ElectronDisplay.jl (e.g. at-spi2-atk, gtk3-devel, libXScrnSaver). And .julia/artifacts/8731693ea495ec92614ea8a5da62f8e66909f0c1/chrome-sandbox needs to be:
-rwsr-xr-x. 1 root root 6322128 22. Dez 12:57 .julia/artifacts/8731693ea495ec92614ea8a5da62f8e66909f0c1/chrome-sandbox
but this is told by electron when used.
SSH is putty with X11 forwarding enabled.
Hope that wasn’t compilation latency
Sorry for wrong quote (edited above)
Anyways: TTFP is quite good considering what’s all needed in this special case.
Thanks @t-bltg! SixelTerm.jl built using Sixels.jl works perfectly for me. It displays CairoMakie figures in the terminal directly. Because X11 forwarding was not working properly for GLMakie, I had to rely on UnicodePlots.jl to display the results calculated on a remote Linux cluster, but now I can use CairoMakie.jl and SixelTerm.jl.
Here is a screen capture showing how it works: