Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Differential limits by process, not calendar #94

Open
skorvek opened this issue Jul 16, 2020 · 3 comments
Open

Differential limits by process, not calendar #94

skorvek opened this issue Jul 16, 2020 · 3 comments
Labels
enhancement New feature or request question Further information is requested
Milestone

Comments

@skorvek
Copy link

skorvek commented Jul 16, 2020

I'm not clear how to write the configuration file to accomplish my goal. I want to apply different limits to different processes, as alluded to in the README introduction. I want to set an overall daily limit matching the login processes, but place an additional shorter limit on other processes (games for example). Creating multiple rule blocks for the same username seems to mix them together as viewed from the admin interface- it applies the last instance of the variable in the file.
The context directive only seems to work for days of the week (arbitrary values prevent startup). I can apply multiple context_label directives but again only the last one appears in the admin interface.

Here's my latest attempt: What am I doing incorrectly?

[RuleSetCHILD]
username=kidusername
process_name_pattern=.*sh|systemd
context_label=login
priority=1
min_time_of_day=10:00
max_time_of_day=18:00
max_time_per_day=4h
max_activity_duration=60m
min_break=20m
#scan_devices=true

[RuleSetCHILD-GAMES]
username=kidusername
process_name_pattern=etr|tuxfootball|tuxpuck
context_label=arcade
priority=4
min_time_of_day=10:00
max_time_of_day=18:00
max_time_per_day=2h
max_activity_duration=30m
min_break=20m

@marcus67 marcus67 added enhancement New feature or request question Further information is requested labels Jul 16, 2020
@marcus67 marcus67 added this to the Version 0.4 milestone Jul 16, 2020
@marcus67
Copy link
Owner

Hi Skorvek,

thank your your feedback.

You pointed out a shortcoming of LittleBrother. In the 0.2.x data model the process pattern is associated with the rule although --- as you correctly found out --- it's actually evaluated once for each user going through the rule sets. Very bad style, I have to admit. In version 0.3.x which will be released soon this has been fixed by cleanly moving the process pattern to the user. See https://github.com/marcus67/little_brother/blob/fb_configuration_gui/WEB_FRONTEND_MANUAL.md for a description of the new configuration frontend.

However, this is not what you want. You want three entities:

[user] 1<->N [process-pattern] 1<->N [rule]

I would second this. However, it's too late to incorporate this feature into the 0.3 release. I marked it for the next 0.4 release.

@skorvek
Copy link
Author

skorvek commented Aug 23, 2020

Great- I’ll keep my eye out for it. This would be very helpful when we are all homeschooling because of the pandemic. It’s hard to keep the little ones on task! Thanks for the software.

@MrFly
Copy link

MrFly commented Jan 15, 2021

@marcus67 really great stuff I have to say :-) Thank you very much for this work - this is really something we searched a long time for.

But I have the same "questions" or "request" as @skorvek. Escpecially for the current home schooling situation, we have some needs:

  • Set free play time without many restrictions (currently possible)
  • Set school time, allow only "whitelisted" processes like ... school apps (kind of "whitelisting": possible? how?)
  • Set restricted time, allow some apps, but not/exclude e.g. browser (kind of "blacklisting": possible? how?)

Is there a way to set something like this in the current version 0.3.8 (newest)? I have to admit, I didn't really understand the current process name pattern (https://github.com/marcus67/little_brother/blob/fb_configuration_gui/WEB_FRONTEND_MANUAL.md); what does this really mean or do?

Another question: If the screen is locked, is this time counted as "active", because the user is logged in? If so, is there a way to take this "screen locked" times out of calculation by some configuration? What would be cool, too: List the active processes in the management view for the user (currently: Host/#Proz -> ABC(4) ).

With this features it really would be the nearly perfect tool for kids PC's and especially in the home schooling situation.

Again, thanks a lot, and I'll buy you some beer!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants