marcus67 / little_brother

Parental Control Application implemented in Python 3 packaged for Debian and Ubuntu to monitor and limit kids' play time on Linux hosts
GNU General Public License v3.0
58 stars 9 forks source link

Provide optional process patterns for processes denoting inactivity #145

Open marcus67 opened 3 years ago

marcus67 commented 3 years ago

Current behavior: There is only one process pattern to recognize activity of a user. If at least such a process is found the user is active, other inactive. Active processes are terminated according to the configured rules. In order to comply with the rules the user usually has to logout completely resulting termination of all processes. This is disadvantages is an activity cannot be interrupted and thus cannot be resumed in the next session.

Desired behavior: There are two more process patterns:

marcus67 commented 2 years ago

Using a process-pattern for inactivity will probably not work since the process doing the actual locking is started at the start of the session but remains inactive until the screen needs to be locked. In case of mate the binary is called mate-screensaver. It comes with a control tool called mate-screensaver-command which allows the state of the screensaver to be queried. So, instead of searching for processes of a given pattern it makes more sense to call the control-binary regularly and check the state. However, this needs to be done on the client, hence we also need to change LittleBrotherTaskBar.

marcus67 commented 2 years ago

See https://github.com/marcus67/little_brother_taskbar/issues/34