# Headless JUCE app with ApplicationCommandTarget

**URL:** <https://forum.juce.com/t/headless-juce-app-with-applicationcommandtarget/20316>\
**Category:** General JUCE discussion\
**Created:** [December 19, 2016, 6:17pm UTC](https://forum.juce.com/t/headless-juce-app-with-applicationcommandtarget/20316 "2016-12-19T18:17:59Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![equinox](https://avatars.discourse-cdn.com/v4/letter/e/47e85d/32.png) [@equinox](https://forum.juce.com/u/equinox)\
**Post date:** [December 19, 2016, 6:17pm UTC](https://forum.juce.com/t/headless-juce-app-with-applicationcommandtarget/20316/1 "2016-12-19T18:17:59Z")

</div>

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

equinox

---

<div class="post-metadata">

**Author:** ![Boran\_Basar](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/boran_basar/32/86_2.png) [@Boran\_Basar](https://forum.juce.com/u/Boran_Basar)\
**Post date:** [December 20, 2016, 5:41am UTC](https://forum.juce.com/t/headless-juce-app-with-applicationcommandtarget/20316/2 "2016-12-20T05:41:08Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![fr810](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fr810/32/841_2.png) [@fr810](https://forum.juce.com/u/fr810)\
**Post date:** [December 20, 2016, 11:22am UTC](https://forum.juce.com/t/headless-juce-app-with-applicationcommandtarget/20316/3 "2016-12-20T11:22:15Z")

</div>

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.

> [@equinox](#):
>
> 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”? d

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.

---

<div class="post-metadata">

**Author:** ![equinox](https://avatars.discourse-cdn.com/v4/letter/e/47e85d/32.png) [@equinox](https://forum.juce.com/u/equinox)\
**Post date:** [December 28, 2016, 1:05pm UTC](https://forum.juce.com/t/headless-juce-app-with-applicationcommandtarget/20316/4 "2016-12-28T13:05:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![equinox](https://avatars.discourse-cdn.com/v4/letter/e/47e85d/32.png) [@equinox](https://forum.juce.com/u/equinox)\
**Post date:** [December 30, 2016, 12:47pm UTC](https://forum.juce.com/t/headless-juce-app-with-applicationcommandtarget/20316/5 "2016-12-30T12:47:40Z")

</div>

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??

---

<div class="post-metadata">

**Author:** ![fr810](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fr810/32/841_2.png) [@fr810](https://forum.juce.com/u/fr810)\
**Post date:** [December 31, 2016, 10:12am UTC](https://forum.juce.com/t/headless-juce-app-with-applicationcommandtarget/20316/6 "2016-12-31T10:12:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![equinox](https://avatars.discourse-cdn.com/v4/letter/e/47e85d/32.png) [@equinox](https://forum.juce.com/u/equinox)\
**Post date:** [January 2, 2017, 2:28pm UTC](https://forum.juce.com/t/headless-juce-app-with-applicationcommandtarget/20316/7 "2017-01-02T14:28:25Z")

</div>

Ok all right, have a work around (to have a x11 server 😉 ) 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

equinox

---

<div class="post-metadata">

**Author:** ![equinox](https://avatars.discourse-cdn.com/v4/letter/e/47e85d/32.png) [@equinox](https://forum.juce.com/u/equinox)\
**Post date:** [January 30, 2017, 2:26pm UTC](https://forum.juce.com/t/headless-juce-app-with-applicationcommandtarget/20316/8 "2017-01-30T14:26:50Z")

</div>

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

greeettz 🙂

---

<div class="post-metadata">

**Author:** ![fr810](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fr810/32/841_2.png) [@fr810](https://forum.juce.com/u/fr810)\
**Post date:** [January 31, 2017, 6:05pm UTC](https://forum.juce.com/t/headless-juce-app-with-applicationcommandtarget/20316/9 "2017-01-31T18:05:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![equinox](https://avatars.discourse-cdn.com/v4/letter/e/47e85d/32.png) [@equinox](https://forum.juce.com/u/equinox)\
**Post date:** [February 14, 2017, 5:24pm UTC](https://forum.juce.com/t/headless-juce-app-with-applicationcommandtarget/20316/10 "2017-02-14T17:24:05Z")

</div>

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 😉 ). 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? 🙂

Thx a lot,

greetz equinox

---

<div class="post-metadata">

**Author:** ![fr810](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fr810/32/841_2.png) [@fr810](https://forum.juce.com/u/fr810)\
**Post date:** [February 15, 2017, 2:49pm UTC](https://forum.juce.com/t/headless-juce-app-with-applicationcommandtarget/20316/11 "2017-02-15T14:49:45Z")

</div>

Yes it’s on develop. See [this](https://forum.juce.com/t/x11-midi-and-other-linux-improvements/20945?u=fabian) post.

---

<div class="post-metadata">

**Author:** ![ftonello](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/ftonello/32/149_2.png) [@ftonello](https://forum.juce.com/u/ftonello)\
**Post date:** [February 15, 2017, 3:01pm UTC](https://forum.juce.com/t/headless-juce-app-with-applicationcommandtarget/20316/12 "2017-02-15T15:01:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![equinox](https://avatars.discourse-cdn.com/v4/letter/e/47e85d/32.png) [@equinox](https://forum.juce.com/u/equinox)\
**Post date:** [February 25, 2017, 8:40am UTC](https://forum.juce.com/t/headless-juce-app-with-applicationcommandtarget/20316/13 "2017-02-25T08:40:33Z")

</div>

hey works now! thhhnx 🙂
