Skip to content

Headless

Makie can be used on headless systems (such as CI servers). This page describes what is required to get different back ends working in headless systems.

Using CairoMakie

For CairoMakie, there shouldn't be any difference in using it on a remote or locally.

Using GLMakie

For GLMakie you can either use X11 forwarding to render on the local host or use VirtualGL to render on the remote server.

GLMakie with X11 forwarding

In this scenario you need an X server on the remote and you will have to connect to the remote server with

ssh -X user@host

See here about more details about X11 forwarding.

GLMakie with VirtualGL

The first step is to install VirtualGL on the remote server (Linux only) and on the local client. If you need to establish the connection to the server via a secondary intermediate server, VirtualGL also needs to be installed there. On the remote server you will need to configure the VirtualGL server. Be sure to check that the configuration is ok.

After everything is set up, you can connect to the remote server via

/opt/VirtualGL/bin/vglconnect -s user@server

and then you will have to start julia via VirtualGL

/opt/VirtualGL/bin/vglrun julia

GLMakie in CI

You can also use GLMakie on CI or servers without a GPU by using xvfb for software rendering. This procedure is used in the GLMakie tests.

Using WGLMakie

For WGLMakie, you can setup a server with Bonito and serve the content from a remote server. This also works for creating interactive plots with Documenter. Check out the WGLMakie docs for more details about this.

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.

If you want to change the port on which WGLMakie runs on the remote, say 8081, you will have to use the following

julia
using Bonito

Bonito.configure_server!(listen_port=8081)

before any plotting commands with WGLMakie.

If you also need to use a different port than 8081 on the local machine, say 8080, you will also need to set the forwarded_port like this:

julia
using Bonito

Bonito.configure_server!(listen_port=8081, forwarded_port=8080)