XDG_RUNTIME_DIR not set in the environment

I would like to test a project that uses go-sdl2 but the docker environment seems not to be able to do it.
I get the error XDG_RUNTIME_DIR not set in the environment because, I thinks, there’s no X env / configuration. Is there any way to run x-based code?
I’m using the circleci/golang:1.9 image

For whom can be interested, I managed to do it using xvfb:

environment:
    DISPLAY: :99
steps:
    - run: sudo apt-get update -qq && sudo apt-get install -y -qq xvfb
    - run:
        command: Xvfb -ac :99 -screen 0 800x600x16 +extension RANDR
        background: true
    - run: <run your stuff>
2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.