I'd like to set time limits for some specific applications (such as games) on Ubuntu. There are various Windows applications that can do this, including HomeGuard Program Blocker, which can limit the usage of certain applications to specific times of day, or restrict application use to certain periods of time. Is there any similar software for Ubuntu?
I just made the following script for this purpose. I named it
timelimit
:Don't forget to make it executable:
Syntax:
Important:
This script should be restarted at midnight if you don't turn off your computer at night. To do this you can add a cron job like:
More about: https://help.ubuntu.com/community/CronHowto
Restrict for each launch
Simple and easily hackable. But use it to control yourself
timeout 15 totem
will exit the program after 15 sec. But can be launched again. Edit and addtimeout <sec>
to apps '.desktop' file'sexec
field