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) {
Mac OS X:
How to do the same in Mac OS X (either from the command line or programmatically)? Thanks!
source share