Enhanced to show a ProgressDialog until X shows the first screen.