Is there a way to run a GUI application in a mute way on a Mac?

I use the following methods to run a GUI application on Linux and Windows:

Linux:

:~$ Xvfb :99 -ac & :~$ DISPLAY=:99 ./app 

This will not work 100% on Mac OS X, even if Xvfb is installed by default, since most applications run in the Aqua environment and simply ignore the setting of the DISPLAY variable.

Windows (software path):

 HDESK hDesk=CreateDesktop(TEXT("Virtual"),NULL,NULL,NULL,GENERIC_ALL,NULL); if(hDesk!=NULL) { // create process in this desktop CloseDesktop(hDesk); } 

Mac OS X:

How to do the same in Mac OS X (either from the command line or programmatically)? Thanks!

+6
source share
2 answers

Is this a Java issue? I recognize neither HDESK nor the call to CreateDesktop, but in the JVM itself you can run headless almost everywhere by invoking java with the headless system property defined ...

 java -Djava.awt.headless=true 

I have had success with this on Windows and Linux at least. I would expect it to work on OS X in the same way. The article explains this pretty well: http://java.sun.com/developer/technicalArticles/J2SE/Desktop/headless/

+2
source

I have the same problem, two more or less related articles are currently found:

https://spideroak.com/faq/questions/72/how_can_i_run_spideroak_without_the_gui_from_launchd/

and

http://lists.squeakfoundation.org/pipermail/seaside/2009-August/021270.html

basically what they offer uses

 --headless 

or

 -vm-display-null 

options

-1
source

Source: https://habr.com/ru/post/906854/


All Articles