When using Julia's GR.jl library on Code Ocean, you may find the following error:
GKS: can't open display on ""
Is your DISPLAY environment variable set correctly?
Did you enable X11 and TCP forwarding?
GKS: Open failed in routine OPEN_WS
On a headless system like Code Ocean GR.jl must be configured with the output device.
To do so, either:
set the environment variable in a shell script:
export GKSwstype=100
; orset it in your Julia code:
ENV["GKSwstype"]="100"
, before using GR.
For more information, see this GitHub issue.