Enabling parental controls is pretty simple if you can live with using a curated free service like OpenDNS Familyshield.
My reason for setting this up was because the kids tended to surf Youtube more than actually doing what they were supposed to...
I also installed and enabled timekpr-next to control the screentime.
Both kids use a plain vanilla Kubuntu-install, the latest LTS version.
2. Enabling OpenDNS
OpenDNS Familyshield IP's to be used
Checking IP-stuff before we do anything.
# nmcli connection show
# nmcli device show
We must disable the automatically set DNS-addresses from DHCP-server in order to set the OpenDNS IP's.
# nmcli conn modify "Trådbunden anslutning 1" ipv4.ignore-auto-dns yes
Then we set the OpenDNS IP's and restart the network manager, which incidentally flushes the DNS cache also.
# nmcli conn modify "Trådbunden anslutning 1" ipv4.dns "22.214.171.124 126.96.36.199"
# systemctl restart NetworkManager
After setting the OpenDNS, we can check the setting again.
# nmcli conn show "Trådbunden anslutning 1" | grep dns:
Flushing the DNS-cache again, if needed and showing some stats.
# systemd-resolve --flush-caches
# systemd-resolve --statistics
These are quick and dirty command references for configuring timekpr-next on the kid's computers.
WARNING: Timekpr-nExT administration utility was asked to run in GUI mode, but no displays are available, thus running in CLI...
The command is incorrect: /usr/lib/python3/dist-packages/timekpr/client/timekpra.py /usr/bin/timekpra
---=== NOTICE ===---
*) numeric time values are in seconds
*) hours are numbered according to ISO 8601 (i.e. 24h clock, format: 0-23)
*) weekdays are numbered according to ISO 8601 (i.e. Monday is the first day, format: 1-7)
The usage of Timekpr-nExT admin client is as follows:
--help ==> print help, example:
--userlist ==> get saved user list from the server, example:
--userinfo ==> get user configuration and time information from the server, example:
timekpra --userinfo 'testuser'
--setalloweddays ==> set allowed days for the user, example:
timekpra --setalloweddays 'testuser' '1;2;3;4;5'
--setallowedhours ==> set allowed hours for the specified day, or "ALL" for every day, optionally specify start and end minutes in brackets like this [x-y], additionally specify ! in front of hour if it doesn't have to be accounted (free time for user), example:
timekpra --setallowedhours 'testuser' 'ALL' '7;8;9;10;11[00-30];!14;!15;17;18;19;20[00-45]'
--settimelimits ==> set time limits for all allowed days, the number of values must not exceed the allowed days for the user, example:
timekpra --settimelimits 'testuser' '7200;7200;7200;7200;10800'
--settimelimitweek ==> set time limit per week, example:
timekpra --settimelimitweek 'testuser' '50000'
--settimelimitmonth ==> set time limit per month, example:
timekpra --settimelimitmonth 'testuser' '200000'
--settrackinactive ==> set whether to track inactive user sessions, example:
timekpra --settrackinactive 'testuser' 'false'
--sethidetrayicon ==> set whether to hide tray icon and prevent notifications, example:
timekpra --sethidetrayicon 'testuser' 'false'
--setlockouttype ==> set restriction / lockout type ("lock" - lock session, "suspend" - suspend the computer, "suspendwake" - suspend and wake up, "terminate" - terminate sessions, "shutdown" - shutdown the computer), examples:
timekpra --setlockouttype 'testuser' 'terminate'
timekpra --setlockouttype 'testuser' 'suspendwake;7;18'
--settimeleft ==> set time left for the user at the current moment of time: "+" (add time), "-" (subtract time), "=" (set exact time available), example (add one hour):
timekpra --settimeleft 'testuser' '+' 3600
--setplaytimeenabled ==> set whether PlayTime is enabled for the user, example:
timekpra --setplaytimeenabled 'testuser' 'false'
--setplaytimelimitoverride ==> set whether PlayTime must be accounted instead of normal activity, example:
timekpra --setplaytimelimitoverride 'testuser' 'false'
--setplaytimealloweddays ==> set allowed days for PlayTime activities, example:
timekpra --setplaytimealloweddays 'testuser' '1;2;3;4;5'
--setplaytimelimits ==> set PlayTime limits for all allowed days, the number of values must not exceed the allowed PlayTime allowed days for the user, example:
timekpra --setplaytimelimits 'testuser' '1800;1800;1800;1800;3600'
--setplaytimeactivities ==> set PlayTime activity process masks, for which the time is accounted, example:
timekpra --setplaytimeactivities 'testuser' 'DOOMEternalx64vk.exe[Doom Eternal];csgo_linux[CS: GO];firefox[Firefox browser]'
--setplaytimeleft ==> set PlayTime left for the user at the current moment of time: "+" (add time), "-" (subtract time), "=" (set exact time available), example (add one hour):
timekpra --setplaytimeleft 'testuser' '+' 3600
I've found it quite practical to set up three Jenkins jobs for each child's computer:
- A job to temporarily add more time.
- A job to add more weekly time, for eg vacation weeks.
- A job to reset the times to the normal values for school weeks.
The Jenkins jobs simplifies the time management to a great extent! You don't have to ssh in to a childs computer, find the correct command and check to make sure the time was changed as expected.
Also, it adds a certain amount of plausible deniability that one kid got more time than the other, as I can point to a executed Jenkin job.
You know what accusation I speak of:
"He got more time than I did!
<me pointing to the Jenkins console output>
"Nope, look here, see?". :-D