parental controls linux- limit computer usage per day

2

2

I've searched and didn't find any working solution for parental controls in ubuntu 14.04 .
The timekpr, gnome-nanny and modifying .pam settings don't work- I've tried them all.
What would suffice for me would be a script to count the total time spent per day. If time spent per current day is over 2 hours, then log out the user automatically.
Any idea of how to accomplish this?
Thank you

dola

Posted 2014-06-16T12:09:59.360

Reputation:

1"...timekpr, gnome-nanny and modifying .pam settings don't work" <-- care to elaborate? How do you expect them to work and what happened when you tried them? – None – 2014-06-16T13:06:25.253

timekpr and gnome-nanny - they had trouble with installation packages -missing dependencies. Mostly, I've tried the solutions from here , but those didn't work.

– None – 2014-06-16T13:27:33.320

Answers

0

I just made an answer available easily. Code is explained on thread http://forums.linuxmint.com/viewtopic.php?f=213&t=77687 . In short: a limit configured in minutes per day, a cron job every minute, a message to user to keep him informed and a forced logoff.

To download and install this, open a Terminal and run the commands below:

cd /tmp/
git clone https://github.com/Thomas-Baeckeroot/ParentalControl.git
cd ParentalControl/
./install.sh

Administrator password will be requested during the installation process (to install the cron job, to copy the script, …). From there you will be guided for all. There is also an ./uninstall.sh at the same place just in case. It is build to work with all Ubuntu based distro (Mint, … probably all debian also). If any issue occurs please let me know, including system version and graphical environment in comments:

uname -a
echo $XDG_CURRENT_DESKTOP

Thomas Baeckeroot

Thomas Baeckeroot

Posted 2014-06-16T12:09:59.360

Reputation: 1

0

I've just released a beta version of my new application LittleBrother that is able to monitor play time on Linux machines. Test users are welcome to try the Debian package. Instructions on how to download and use it can be found here: https://github.com/marcus67/little_brother. The installation may still be a little rough, though. These are the features of the application:

  • 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 miniumum 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 forced logouts. Also these spoken messages are internationalized.
  • In addition to the time spent on Linux hosts the application can also monitor activity time on other devices such as smart phones 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 the 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.

Marcus Rickert

Posted 2014-06-16T12:09:59.360

Reputation: 161

0

Take a look at workrave (http://www.workrave.org/). It's in Debian repos too. It was intended for different purpose (to prevent yourself from working too much) but it has 'daily limit' option with the ability to block input. Of course some tweaking will be required to prevent your kid from getting around it.

irezvin

Posted 2014-06-16T12:09:59.360

Reputation: 21