How to force user to run quiz after login and before displaying desktop

Solution 1:

Here's a super simple way. Have your quiz program run during the Xsession, right before the desktop gets launched.

For example, try creating a file (as root) called /etc/X11/Xsession/95quiz with the following contents:

xmessage "What is my favorite color?" -buttons "African Swallow,European Swallow,42" -print -center

Upon logging on, you will not be able to use the computer until the quiz program exits.

Of course, the way I have it setup, all users of the computer will be quizzed, which seems fair to me. Running it from only your kid's .xsession is left as an exercise for the reader. :-)