Skip to content
Search

Arcade:Headless

lastmod 2023-01-15created 2023-01-151 edits

For some applications, you may want to run Arcade without opening a window. You might want to draw images into a buffer and save them for use on a server or in data science visualizations. In remote cloud jobs, the computer may not even have a monitor. Running Arcade this way is called headless mode.

Arcade can render in headless mode on a Linux server with EGL installed. This should work in desktop environments, on servers, and even in virtual machines. Depending on the use case, both software and hardware rendering should be possible.

We are leveraging headless mode from pyglet. If you are looking for knowledge about the inner workings of headless, that is the place to look.

Enabling headless mode

Headless mode must be configured before importing Arcade. This can be done in the following way.

# Before arcade is imported
import os
os.environ["ARCADE_HEADLESS"] = "True"

# The above is a shortcut for
import pyglet
pyglet.options["headless"] = True

This of course means that headless can be configured externally.

$ export ARCADE_HEADLESS=True

See also

Favorite site

author Zer0 sitemap