Add flag to start the app hidden in the tray.

Closes #4990.