You could also do this server side by popping up a dialog from xstartup.d.
We could also let the desktop environment handle this. Bug 5951 covers some of this.