main: defer startup dialogs

First run the mainloop bring up the dialog from an idle handler.