Parental Control on Debian Hosts


Published on April 19, 2019 by Marcus Rickert

Debian Python Parental-Control

4 min READ

They like to play a lot, those kids, and especially on their computers, tablets, game consoles and god knows what other electronic devices they are able to get their hands on. And what do we parents do? Try to think about what the net effect of all the media time will be… Positive, because they acquire excellent motor skills and are able to process audiovisual input at a breathtaking speed? Or rather negative, because they often neglect personal interaction with other kids (or their parents) and tend to be more aggressive after a game of Fortnight than they usually would?

The problem is: we don’t know beforehand. Still, as a parent we have the urge to at least TRY to control and limit the consumption of media and time spent with electronic devices.

Owners/users of macOS or Windows PCs usually have no trouble finding software helping them in their endeavor to monitor what their kids are doing on their PCs and enforcing some kind of limits.

Users of Linux, however, do have a harder time. There are some products around, but they usually concentrate on ONE PC assuming that the kid is only allowed to us exactly that device. In our household, my son can use two different PCs since his home directory is mounted on both. So playtime should be aggregated over the “cluster”. Also, it’s kind of nice to have the option to administer the playtime from “remote” when the kind calls me while I’m away and asks for additional time. Most systems can only be controlled locally with direct access to the host.

Little Brother Logo

In comes my software project LittleBrother which I started in late 2017 in Python to deepen my knowledge of this programming language and — at the same time — solve the problem of ever-increasing media time of my son.

In April 2019 I released the first version of my software on GitHub. It can be downloaded as a Debian package and has the following features:

  • Any number of users can be monitored.
  • Each user can have a specific set of rules defining the permitted playtime.
  • Rules can be adapted to “contexts”, such as the day of the week and/or a vacation schedule (currently only the German schedules are supported).
  • Play time can be restricted to a time window (from, to).
  • A maximum play time per day can be defined.
  • Users can be forced to take a break after a certain maximum session time.
  • Users can be forced to wait for a minimum break time after their activity.
  • Any number of Linux client hosts can be monitored (currently this requires users to have the same login on all machines).
  • There is a master host with a history of the activities of all users. This master host checks the rule sets and prompts the client hosts to terminate processes if required.
  • The master host offers a simple web interface for viewing the user activity over a configured history length (e.g. 7 days) and an administration page to dynamically define rule exceptions for a configured number of days into the future.
  • The web application can be run behind a proxy so that it will be accessible from away allowing remote administration after receiving calls from young users begging for more play time.
  • The application has international language support. Currently English and German translations are provided. Users are invited to provide translations for other languages.
  • The application uses voice generation to inform the user over impending logouts. Also, these spoken messages are internationalized. Optionally, users can be notified using four different popup tools.
  • In addition to the time spent on Linux hosts the application can also monitor activity time on other devices such as smartphones or tables. It takes advantage of the fact that most modern operating systems put devices in some kind of power saving mode while they are not being used. This way, the network response (by pinging) can be used to determine the activity on those devices. In contrast to the Linux hosts, the application will not be able to terminate the activity. The play time, however, will be added to the overall playtime and hence will have an impact on the time allowed and also on the break time rules on the Linux hosts.

I hope that this application will also help other parents. I would be happy about people willing to test it! Find all required information at GitHub.