Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Login time quota

Reply
Thread Tools

Login time quota

 
 
Koos Pol
Guest
Posts: n/a
 
      03-17-2007
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
--
43rd Law of Computing: Anything that can go wr
fortune: Segmentation violation -- Core dumped
 
Reply With Quote
 
 
 
 
grocery_stocker
Guest
Posts: n/a
 
      03-17-2007
On Mar 17, 8:07 am, Koos Pol <k...@geen.spam> wrote:
> 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.

 
Reply With Quote
 
 
 
 
Koos Pol
Guest
Posts: n/a
 
      03-17-2007
On zaterdag 17 maart 2007 16:40 grocery_stocker wrote:

> 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
--
43rd Law of Computing: Anything that can go wr
fortune: Segmentation violation -- Core dumped
 
Reply With Quote
 
s. keeling
Guest
Posts: n/a
 
      03-24-2007
["Followup-To:" header set to comp.os.linux.misc.]
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


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.


--
Any technology distinguishable from magic is insufficiently advanced.
(*) http://www.spots.ab.ca/~keeling Linux Counter #80292
- - http://www.faqs.org/rfcs/rfc1855.html Please, don't Cc: me.
Spammers! http://www.spots.ab.ca/~keeling/emails.html
 
Reply With Quote
 
s. keeling
Guest
Posts: n/a
 
      03-24-2007
["Followup-To:" header set to comp.os.linux.misc.]
Koos Pol <>:
> On zaterdag 17 maart 2007 16:40 grocery_stocker wrote:
> >
> > Sir,
> > I think you underestimate the power of a bored teenager.

>
> I know. I have one


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


--
Any technology distinguishable from magic is insufficiently advanced.
(*) http://www.spots.ab.ca/~keeling Linux Counter #80292
- - http://www.faqs.org/rfcs/rfc1855.html Please, don't Cc: me.
Spammers! http://www.spots.ab.ca/~keeling/emails.html
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ISG: volume based quota Pavel Crasotin2147483647 Cisco 0 04-07-2006 11:58 AM
Disk Quota =?Utf-8?B?Q29saW4=?= MCSE 0 02-05-2006 11:39 PM
HELP~215 test about quota =?Utf-8?B?bG92ZXJhaW4=?= MCSE 6 06-21-2005 12:53 AM
I received an autoreply for being over quota but cant stop the spam Andy Starnes Computer Support 4 12-12-2003 09:14 PM
Re: Disk quota Nettransplant MCSE 0 09-14-2003 08:46 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57