Add flag to start the app hidden in the tray.

Closes #4990.
Merge remote-tracking branch 'refs/remotes/ivan/feature/4990_start-hidden-flag' into develop