Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Time limiting access to the Internet (Parental Controls)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
dougmcmahon
n00b
n00b


Joined: 09 Mar 2003
Posts: 24

PostPosted: Fri Dec 26, 2003 9:17 am    Post subject: Time limiting access to the Internet (Parental Controls) Reply with quote

Hi,

I've been googling and browsing the forums trying to find a method to solve what I thought would be a straightforward problem.

Basically I want to be able to limit time spent browsing per day/per sesion. There doesn't seem to be any parental control systems for linux. I have found many ways to limit data throughput and take down eth0 after set amounts of time but not an automatic way of limiting time in a browser.

If the above isn't available is there a comand to launch an application that will kill it after x minutes? This doesn't have to be secure in anyway - I don't mind if you can even just fire up the browser to start again.

Thanks in advance for your help,

Doug
Back to top
View user's profile Send private message
annex
Tux's lil' helper
Tux's lil' helper


Joined: 04 Dec 2002
Posts: 102

PostPosted: Fri Dec 26, 2003 8:17 pm    Post subject: Reply with quote

Quote:
If the above isn't available is there a comand to launch an application that will kill it after x minutes? This doesn't have to be secure in anyway - I don't mind if you can even just fire up the browser to start again.


I'm sure there's an answer to your other information, but I don't know it offhand, so I'll give you one that this easy part of your question. If you could use a PID somehow this would be better but I don't know offhand how to find out the PID of the launched browser. Either way, I'd just suggest that when the browser launches have sleep run in the background and execute a killall after a given amount of time. For example the command/link to launch 'browser' would instead run:

Code:
browser& sleep 30m killall browser&


checkout man for more information on sleep. It'll be a super easy way to do that. Something else you could do is touch a file when the browser starts, and have a bash script check if the file exists. If it does exist it would simply not launch the program, maybe give a message telling the user their time has expired. Then simply have cron remove the file once per day etc, along with the sleep command you could effectively limit them to X amount of time per day. However the problem with that is if they only used 30 mins of the hour you gave 'em it would still kick 'em off. hmm, if you used a program like time though you could see how much time they used and have a program calculate how much to give 'em next tme they launch. All this could be easily bypassed unless you set it up carefully, but as long as your kids don't know the innerworkings of linux yet they won't be able to do anything. Besides, if they managed to bypass it then they'd be learning too, always look on the bright side :wink:

Now that I've thought of it, I know a way of solvig this problem just not really how to program it offhand. Some perl and it'd probably be rather simple with a few commands like time, sleep, and cron. However my initial idea will work, even if at the most basic of level.

Good luck,
There is a way :)
Back to top
View user's profile Send private message
Steve S.
Tux's lil' helper
Tux's lil' helper


Joined: 22 Sep 2005
Posts: 131

PostPosted: Sun Nov 27, 2005 11:01 pm    Post subject: Reply with quote

this thread may be long dead but perhaps this can help someone else searching.

I'm still new to the game, and haven't actually tried this one, but it was recomended on another forum and looks pretty good.
http://dansguardian.org/?page=whatisdg
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum