Is "Run Headless on Linux" working out of the box?

I’ve been checking the juce6 branch, as i needed the advertised run headless on linux feature. Compiled the app (it’s a normal gui app that can work from console without showing any windows or top level component when run in that mode), executed in jenkins, and all i got is:

Failed to connect to the X Server.

I’m now unsure if the feature got into juce 6 is still a work in progress. Any ideas ?

EDIT: i’ve been browsing a bit the code and it seems you determine if X11 is available only if you can link with its libraries, not if the server is running at all. There are cases in which you might have the libs, but the server is not started.

is it needed that an ApplicationCommandManager requires X11 ? i have my application using ApplicationCommandTargets for non UI classes as well, but it seems that i can use that in a console app on mac and windows but not on linux (unless i have x11 running).

This has been updated now on the juce6 branch here so that we don’t terminate the process if no X server is running, and instead continue to run headlessly.

I’ve tried to reproduce this and was able to run a headless build using some command targets. Can you post some code that reproduces this?

will try to bump to latest juce6 and check if it works.