MacOS – Implement feature not available in Parental Controls

macosparental-controls

I would like to use (or write) a timer that I can setup to use with my kids on Mac OS X (Yosemite). The functionality which I would like, which I haven't found off the shelf is:

  • Set the timer for a period, T (e.g. 20 mins)
  • Print a warning to the screen at T-n (e.g 17 mins)
  • Lock the computer at 20 mins
  • Unlock with administrator access only

I've experimented with pmset schedule but it allows the user to override.

Parental controls as currently implemented don't work for this as we want to split their time into smaller units, and more than one kid uses the same login (and I've read that this feature is buggy under Yosemite)

This timer could be started via the command line or graphically.

Best Answer

I'm far too lazy to implement this, and I don't have kids so have no need, but it would seem imminently possible with a cute python or Terminal script set to start running at login. This post seems to go over pretty well the Terminal logout commands. Couple that with the system time, date, is what you'll want and choose whichever output works best for you. Past that, it's somewhat unclear if you should be able to log in as a user again (just put a password on that account with no admin privileges) or if you want to have an admin log a user with no password in. The latter is probably slightly more difficult to do, but assuredly not impossible.