Do not let the child on the Internet - he is stupid from this! (bash.org.ru)Here we will talk about the technical means of limiting the time spent by the child at the computer. (The topic of parental control of Internet access on the subject of porn, social networks (or something else they are afraid of) is not affected here. Yes, and the phrase pronounced as an epigraph is not about that.) its implementation. Or, perhaps, they will convince me to abandon the invention of the bicycle, since someone has already implemented everything for a long time.
I'll tell you how this is done in our family. The children mark the time with an external alarm clock (telephone), and at my leisure I look through the logs and, as necessary, I distribute SIGSTOP, SIGKILL and other lyuley, including IRL. It is clear that such a system is not very convenient, since it requires additional control and does not take into account how a child uses a computer. I only look at the last - who when I logged in / out of the system, so I don’t distinguish between who was playing and who was listening to the audiobook. (Only shh! - children still believe that dad sees everything.)
')
It ceased to suit me, and I wanted to make a little automation. First of all, it is necessary to formulate the requirements for such a control system. What exactly the requirements should be is not quite obvious; I have made only the following sketch.
- Separation of types of child-computer interaction into several classes (games, films, audio books, self-education (reading wikipedia and other documentation), ...). The classification should be based on two factors: the degree of stress on the eyes and the nervous system and, let's say, developmental benefits. Most games are more entertaining than developing, and I want to stimulate the child to do more useful than enjoyable.
- The flexible task of a time constraint system based on classification. For example, such a class as audiobooks can be considered harmless to the body, and therefore not limited at all. It would also be convenient (for the child) to transfer the unused balance of time to tomorrow or even borrow (hehe, with interest), but all these frauds should be invested in tight restrictions (per day, per session, etc.).
- Convenient and clear indication of the remaining time and chain of warnings (up to the last Chinese, followed by killing all the processes and banning the user account).
- Journaling: who spent what time and how.
- Consider the presence of multiple computers. If children want to hack the net, there’s no reason to deny it.
With regard to burglary resistance, it is enough only to not work very naive ways to circumvent the restrictions. Anyway, it is unlikely to be done reliably, because if you have a physical access to the hardware, getting a root is not a problem. And if a child knows how to do it, then you probably should not try to control it.
The basic ideas of implementation (for Linux) are as follows.
- Collection of statistics on the processes (it seems atop from this review should come up).
- A daemon (in a pinch, a script called via cron) that scans these statistics and makes decisions.
- Notification system: probably occasionally a pop-up window and a timer somewhere in the status bar (although I, for example, do not use such excesses as a status bar); also in the started cases sending of SIGSTOP and in some seconds SIGCONT (true, not all processes can survive this).
- Well, repressive mechanisms (screen lock screensaver and further sudo -u luser kill -9 -1) - this is quite simple.
It is not yet very clear how to classify processes. You have to either manually or use heuristics like "everything from / usr / games is games."
In general, I myself have not really thought out exactly what I want and how. Therefore, substantive comments of a technical, medical, methodical and pedagogical nature are welcome.