Ubuntu 서버를 remote로 두고 local pc에서 GLMakie 창이 뜨게 하는 방법은
먼저 PC에 x-server terminal 서버 설치 또는 MobaXterm같은 무료 프로그램 설치를 통해 설정이 가능하다.
MobaXterm : https://mobaxterm.mobatek.net/
MobaXterm에서 remote server에 접속한다. 접속 후 DISPLAY변수에 설정된 값을 조회 한다.
아래 화면 처럼 DISPLAY값을 확인 하고 X server가 활성된 것을 확인 한다. (활성화 되지 않으면 회색으로 보임)

위 x-terminal에서 확인한 DISPLAY 환경변수 값을 아래 Julia 환경 변수에 설정 한다.
ENV[“DISPLAY”]=”localhost:12.0″ 와 같이 display할 환경변수를 설정하고 실행하면 local pc에 GLMakie창이 뜬다
ENV["DISPLAY"]="localhost:12.0"
using GLMakie
GLMakie.activate!()
using Random
using Random:seed!
function lines_in_3D()
seed!(123)
n = 10
x, y, z = randn(n), randn(n), randn(n)
fig = Figure(; resolution=(1200, 500))
ax1 = Axis3(fig[1, 1]; aspect=(1, 1, 1), perspectiveness=0.5)
ax2 = Axis3(fig[1, 2]; aspect=(1, 1, 1), perspectiveness=0.5)
ax3 = Axis3(fig[1, 3]; aspect=:data, perspectiveness=0.5)
lines!(ax1, x, y, z; color=1:n, linewidth=3)
scatterlines!(ax2, x, y, z; markersize=15)
hm = meshscatter!(ax3, x, y, z; markersize=0.2, color=1:n)
lines!(ax3, x, y, z; color=1:n)
Colorbar(fig[2, 1], hm; label="values", height=15, vertical=false,
flipaxis=false, ticksize=15, tickalign=1, width=Relative(3.55 / 4))
fig
end
lines_in_3D()
ㅇ
