Headless JUCE app with ApplicationCommandTarget

Hey guys,

I have an App thats works fine as a GUI. Now I want to build it without GUI Elements, this is no problem except of ApplicationCommandTarget.

Is there a way, that i can use it (use it together with Midi and invokeDirectly() … ) so that i dont have to rewrite all the code?

Btw when I remove the gui modules from the Projucer, juce_audio_processors says it needs the gui stuff… what is meant with “interlly generated audioprocessors”? dont think i need them so i’ve thrown away this module also.

Thx in anticipation & greetz


Not what you are asking but why dont you just make your Mainwindow invisible?(setVisible(false))

This should work without any problems. You can create a console app within the Projucer but still use the Application class and the START_JUCE_APPLICATION macro - just don’t create any windows. I haven’t specifically tried using ApplicationCommandTarget but don’t see a reason why it should not work.

You’ll still need to include the GUI module for defines etc. even if your AudioProcessors don’t have any editors. Including the GUI module does not make your app a GUI application.

Ok juhu got to get it work now, thx for your help!

Ahhh this was to early.
When I start my app out of a desktop enviroment like lxde in a terminal emulator, everything works fine. But when I loggin to a headless linux without an x server running, there comes the message
"Segmentation fault (core dumped)".
Cant figure out where its actually crashing, cause my gdb knowledge is not that good … But seems like that some code needs an x server running or sth? A pure Console App (from Projucer) is working… mhhh … any ideas??

Sorry JUCE doesn’t currently work without an X11 server running. We already have a fix for this in the back log and we will release it soon.

Ok all right, have a work around (to have a x11 server :wink: ) right now so its just about 4sek more boot time and the ram for the x server. but for the future it would be cool.

thx & greetz


P.S.: Is there sth like a date when this X thing will be fixed?

greeettz :slight_smile:

Yes very soon. We are just ironing out a few bugs. Sorry I can’t be more specific.

Hey, trying to get JUCE to run with buildroot (Today i could see the first time “JUCE v.4.3.1” which was a good feeling actually :wink: ). But now I have some problems think they deal with X which I only have because of the deps. So I dont want to stress… but are there some news on this issue? :slight_smile:

Thx a lot,

greetz equinox

Yes it’s on develop. See this post.

I also recommend you using OpenEmbedded (Yocto) for cross-compilation. There is support for JUCE in meta-multimedia.

hey works now! thhhnx :slight_smile:

1 Like