From OpenSCADAWiki
If you still have problems with the console-terminal or you deliberately want the background run in the graphical environment — the so-called "start or close in the system tray", then at this stage you can re-run the demo configuration, as described in this section top (Fig.3.1.1), set the Collapse or startup to the system tray option of the UI.QTStarter module and close the configuration window so that the AGLKS simulator project collapses to the system tray.