1

Possible Duplicate:
How can I set computer usage time limits?

I've looked at a number of other threads but most of them talk about how to restrict the time of day an account can log in... What I'm looking for is a simple way to restrict the total usage minutes during any 24-period, e.g. I want to allow "jsmith" to be logged in a total of 120 minutes per day. I don't necessarily care WHEN jsmith is logged in; I just want to cap his total time at 120 minutes during the 24 hour period 0000-2400.

I looked at the question, "How do I restrict my kids' computing time" but again that focuses on WHEN the account can actually log in, not how LONG the account is allowed to remain logged in.

The solution needs to "remember" previous logins even after the user has logged out; for example if jsmith logs in for an hour in the morning, then logs out, jsmith should not be allowed to remain logged in for more than an hour in the afternoon or evening, for a total of 2 hours usage per 24-hour period. What is the easiest way to accomplish this in Ubuntu 11.04?

3 Answers3

0

If you open a terminal and type w, then you can see who are logged on and when they logged on. If they logged in more than an hour ago, then you suspend the account and log off the user. You would preferably use the notify-send command to notify the user before logging off.

I don't know any applications that does exactly this, but it should be easy to make one, I think.

0

As long as you are on 11.04 you can use timekpr, that also allows to restrict the computing time of a user within a 24h range.

Alternatively, only available in Ubuntu <= 11.04 is the command line tool timoutd Install timoutd that allows such time restrictions.

Sadly, neither tool works any more in 11.10.

Takkat
  • 142,284
-1

In http://bugs.launchpad.net/timekpr/+bug/881098 has been instructed how to make timekpr to function in 11.10. Works at least for me.

Ossil
  • 1
  • A link to a bug report is only minimally useful. Could you include in your answer the steps needed to workaround the bug? – Flimm Nov 12 '12 at 15:26