Login time quota

K

Koos Pol

After unfruitful debates with my teenage daughter about not spending too
much time on her computer, I decided to take the more eh, pragmatic
approach. As I couldn't find any program that suites me, I've written a
small Perl script that you can launch from your Un*x boot scripts.
You can run it like

login_quota -u mary -t 120 &

This will make sure Mary does not spend more that her alloted 120 minutes.

Some things perhaps noteworthy:
- It pauses timing when Mary's screensaver is running
- It can be fooled if she leaves a screensaver running on another X display
- Configuration locations are hard coded.
- It could use a day scheme variation. It would be nice to allow different
quota for for instance weekends.

But as it suits me already I'm not bothering to take it up another step.
If anyone wants to steal or borrow it, please feel free. I would appreciate
it though if you make your improvements public.

http://www.xs4all.nl/~koospol/public/login_quota

Cheers,
Koos
 
G

grocery_stocker

After unfruitful debates with my teenage daughter about not spending too
much time on her computer, I decided to take the more eh, pragmatic
approach. As I couldn't find any program that suites me, I've written a
small Perl script that you can launch from your Un*x boot scripts.
You can run it like

login_quota -u mary -t 120 &

This will make sure Mary does not spend more that her alloted 120 minutes.

Some things perhaps noteworthy:
- It pauses timing when Mary's screensaver is running
- It can be fooled if she leaves a screensaver running on another X display
- Configuration locations are hard coded.
- It could use a day scheme variation. It would be nice to allow different
quota for for instance weekends.

But as it suits me already I'm not bothering to take it up another step.
If anyone wants to steal or borrow it, please feel free. I would appreciate
it though if you make your improvements public.



Isn't this a bit excessive? Wouldn't have just been easier to either
install something like logoutd or configure PAM to limit her login
time? Maybe I need to take a closer look at the script, but what
happens say if she is on two hours and the script kicks over and then
she decides to reboot the machine? Will the script remember this? Sir,
I think you underestimate the power of a bored teenager.
 
K

Koos Pol

Isn't this a bit excessive? Wouldn't have just been easier to either
install something like logoutd

Too bad I haven't heard of that one when I initially was searching for
someting suitable.
or configure PAM to limit her login
time?

I never got to understand PAM really.
Maybe I need to take a closer look at the script, but what
happens say if she is on two hours and the script kicks over and then
she decides to reboot the machine? Will the script remember this?

Yes. It writes to a personal timer file.
Sir,
I think you underestimate the power of a bored teenager.

I know. I have one :)

Koos
 
S

s. keeling

["Followup-To:" header set to comp.os.linux.misc.]
Koos Pol said:
After unfruitful debates with my teenage daughter about not spending too
much time on her computer, I decided to take the more eh, pragmatic
s/pragmatic/fascist/

approach. As I couldn't find any program that suites me, I've written a
small Perl script that you can launch from your Un*x boot scripts.
You can run it like

login_quota -u mary -t 120 &

This will make sure Mary does not spend more that her alloted 120
minutes.

Why in the world would any parent do this to their kid? Because they
can?
If anyone wants to steal or borrow it, please feel free. I would appreciate

_Good_ _God_, _no_.

Computers are many things, including mostly harmless fluff (myspace &
youtube), babysitter (WWW), entertainment (WWW), crass commercialism
(WWW), and educational (all of the above, perhaps excepting youtube).
Why is it so annoying to you for your teenage daughter to spend more
than an hour and a half doing that? Why do you consider it your right
to interfere with that? Isn't that better than an hour and a half on
a telephone babbling, "And I was like, ..."?

I wonder how much time Linus T. spent each day on his machine when he
was her age.

You parents can be such jerks sometimes. Leave the kid alone.
 
S

s. keeling

["Followup-To:" header set to comp.os.linux.misc.]
Koos Pol said:
I know. I have one :)

I sympathise with the bored teenager. I think her parent should get
out more often.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top