Monday, August 31, 2009

Beachballin'

One of the things that has annoyed me most about parental controls on Leopard is the logs and reporting feature. Every time I go to that screen in the Parental Controls, I get a beachball. It never comes back. And I end up having to Force Quit the System preferences.

I picked up a tip in the Apple forums some time ago, and I thought I would share it here.

Sometimes your child goes to a normal website and it has a link to something you think should be allowed. So the easy method would be to look at the logs on the parental controls to see what the most recently blocked website is. Then that site could be added and everything would theoretically run swell.


However, if you are like me and you get the beachball, you need a way around this. I have two. The first is to look in Safari at the Activity window.

But if you don't mind getting your hands dirty, I like the following method better.

Open up Terminal.
su mokidad
Password:

You will need to replace mokidad with your own shortname. The su (substitute user) command allows you to pretend to be you while logged in on the kids account.

Then copy and paste these next two commands.
cd /Library/Application\ Support/Apple/ParentalControls/

sudo sqlite3 Users/kids/events.data "SELECT datetime(ZDATE,'unixepoch','31 years','localtime'),ZPAGETITLE,ZPAGEADDRESS from ZBLOCKEDWEBSITE" sudo sqlite3 Users/kids/events.data "SELECT datetime(ZDATE,'unixepoch','31 years','localtime'),ZPAGETITLE,ZPAGEADDRESS from ZBLOCKEDWEBSITE"


Notice, there are two bold kids there. You will need to replace those with the shortname of the user you are trying to inspect. This will spew an entire history of all the blocked websites with the most recent ones being printed last. It will very quickly show you the website that was blocked. The last few lines of output for mine look something like this:


2009-08-31 20:25:46||http://1.channel29.facebook.com:80/x/670286327/false/p_100000106381638=1
2009-08-31 20:26:51||http://1.channel29.facebook.com:80/x/4098069827/false/p_100000106381638=0
2009-08-31 20:50:10||http://2.channel29.facebook.com:80/x/1785344291/true/p_100000106381638=0
2009-08-31 20:53:51||http://8.12.43.175/hotdices/game_farkle_users.php?view=week&filter=friends&filter_game=simple&fb_sig_user=100000106381638&fb_sig_session_key=2.320_VmoCnoNfm0g9nbr09Q__.86400.1251856800-100000106381638&sesid=b8guughed00thu115mvl9ovsuo06ojg3&time=1251770028734
2009-08-31 20:53:57||http://8.12.43.175/hotdices/game_farkle_data.php


I added the bold to highlight the important data. My daughter was on facebook and wanted to play the farkle game. Since it would not load, I was able to run this command and quickly isolate the server which was being blocked.



To enable Farkle on Facebook you will need to add access to
http://apps.facebook.com
http://8.12.43.175

No comments:

Post a Comment