I am using GitLab CI to run automated tests on an Ubuntu 14.04 setup. The GitLab CI runner created a new user,
gitlab-runner, which executes all the tests. Now these tests include GUI components, so I need an X display - which I force on even without a physical display via the
CustomEDID options in the
The problem is that when a test is started by the user
DISPLAY=:0.0 ./runTestApp, I get a "Could not connect to display :0.0" error. I can fix it by logging in as a regular user on the workstation and run
sudo DISPLAY=:0.0 xhost +.
- I haven't found a way to successfully automatically run
xhost +on startup (tried putting it in
- The man page says that
xhost +is actually very insecure, but I haven't found out what to do instead. It feels like it might have to do with an
.Xauthorityfile (which my regular user has, but
What's the best way to give
gitlab-runner permanent access to the X display?