Tag Archive mac os x

Fixing Mountain Lion Runaway parentalcontrolsd

We upgraded a machine to Mountain Lion (10.8.2), but found that parentalcontrolsd was running constantly with high CPU usage. The steps to correct the problem were found on the Apple Support Forums.

  1. Disable parental controls on all users.
  2. Delete the folder /Library/Application Support/Apple/ParentalControls
    Please note that this command is a little dangerous.[code lang=”sh” light=”true”]$ sudo rm -rf "/Library/Application Support/Apple/ParentalControls"[/code]
  3. Restart Mac.
  4. Enable parental controls again.

Tags, , ,

Using MySQL Administrator Over a Secure (ssh) Connection

MySQL Administrator is not designed to work over a secure connection like ssh. By using ssh tunneling, you can connect to your remote MySQL servers from your workstation.

MySQL Tools

Download the MySQL Tools package.
Install the MySQL Tools package. On the Mac, just drag to Applications.

Create the Tunnel

To create the tunnel, open a shell (Terminal on the Mac) and run the following:

$ ssh -N -L3306:127.0.0.1:3306 username@remote_hostname

-N instructs ssh to run silently without creating a remote shell.
-L a:b:c instructs ssh to use port “a” on the local machine and map it (from the remote server’s viewpoint to port c on machine b).
Now you have a secure tunnel to the server.

Use the Right Hostname

If you run on a Un*x based workstation (i.e. Mac or Linux), when you run either the MySQL Administrator or the MySQL Query Browser, set the “Server Hostname” field to “127.0.0.1”.

MySQL Administrator connection dialog

If you skip this step you will receive the following error:
Error Dialog

Tags, , , , , ,

Upgrading Subversion on OS X

Subversion Logo
I started receiving messages about my version of subversion being out of date. Jettro Coenradie wrote an article on how to upgrade the subversion client on your Mac.

It boils down to this:

  1. Download and run the latest Collabnet installer for subversion on the Mac.
  2. Ensure that your path includes /opt/subversion/bin before the old subversion path /usr/local/bin. For example, I have in my .bashrc file:
    # Check for Collabnet Subversion
    if [ -d /opt/subversion/bin ]; then
    export PATH=/opt/subversion/bin:$PATH
    fi
    
  3. If you have programs like SCPlugin that interact with Finder, log out and log back in so that all of your processes have the new path.

Tags, , , ,

How to Unfreeze the OS X Desktop

I move my laptop around hooking up monitors, disconnecting them, etc. Occasionally the desktop freezes. The icons do not respond to any mouse clicks, nor does the desktop change if removable storage devices (e.g. FireWire external drives) are attached or removed.

To fix this, I open the Terminal program and type:


killall Finder

That gives Finder a kick to the head and the Desktop starts working the way that it should.

Tags, , , , , ,

Workaround for FreeMind OutOfMemory Exception (Mac OS X)

FreeMind 0.8.1 splash screen
I’ve been having trouble running FreeMind on Mac OS X. I have the FreeMind icon in the dock. When I click on it to launch FreeMind, it hangs for a while, with the CPU pegged.

FreeMind 0.8.1 splash screen

After some time I get a “Cannot launch Java application” dialog box with the text “Uncaught exception in main method: java.lang.OutOfMemory: Java heap space”.

FreeMind 0.8.1 splash screen

I found a workaround on Julianus’ Blog. (Thank you!) This is a little ugly, but it works. I can use FreeMind.

Step 1
Run the Terminal program.

Step 2
Create a soft link from the FreeMind JAR file to some convenient location in your user account. Type the following all on one line, then hit “return” — or use copy and paste. 🙂

$ ln -s /Applications/FreeMind.app/Contents/Resources/Java/lib/freemind.jar freemind.jar

This will create a soft link (called an “alias” in OS X parlance) in your home directory. You can click on this to “open” the JAR file, causing FreeMind to run normally.

Step 3
(This step is optional.) Drag the icon to the file portion of your dock. This will allow you to run FreeMind with a single click.

This is more a hack than anything, but it gets the job done.

FreeMind 0.8.1 splash screen

Tags, , , , ,

Getting nmap to Work on Mac OS X

insecure-org.jpgThe nmap security checking tool appears to have some trouble detecting the network adapters on Leopard (Mac OS X 10.5). To make it work one must add the following command-line parameter (to use the built-in NIC):

-e en0

One can discover the other network interfaces with

$ sudo ifconfig

Ordinarily en0 is the built-in ethernet port and en1 is the wireless adapter.

zenmap

If you use the handy zenmap user interface for nmap, you can do several things. For example, you can edit the profiles, or just include this in the target field (-e en0 target machine name). I edit the profiles that I use and set the network interface. Go to the Source tab, check Set network interface (-e), and type en0 in the edit field.

Profile Editor-1.jpg

2008-12-04 Update:
* Added more details for zenmap, hyperlinks.

Tags, , , ,

How to delete all photos off of an iPhone

Colin published a great article on how to delete all photos off of an iPhone. There’s no way to do it from the iPhone itself. However, there’s an easy solution.

Summary: Use Image Capture (found in the Applications directory).

Tags, , , , , , , ,

Improve Mac OS X performance under load by disabling spindump.

I push my Mac real hard at times. When the disk is thrashing hard, I’ve noticed a program called spindump that’s running. Here’s what the man page says:

spindump is a tool used by various system components to create hang reports and notify the user of application hangs. … For normal application crashes spindump will display a dialog to alert the console user to the crash and offer the choice to view more details about the crash and/or report the crash to Apple.

On Yan Pritzker’s blog I found some great tips. Patrick suggested the following. (Please ensure it’s all on one line.)

sudo launchctl unload -w  /System/Library/LaunchDaemons/com.apple.spindump.plist

After running this, I don’t see spindump, and the disk isn’t thrashing as hard. Yeah, I’m running two heavy virtual machines that are hammering their virtual disks, but it appears that I’ve gained something.

Thanks, guys!


2009-03-27 Update: Fixed typo. A huge thanks to Rob for catching that.

2011-02-23 Update: It was suggested that I also mention how to reverse this. Use load instead of unload.

sudo launchctl load -w  /System/Library/LaunchDaemons/com.apple.spindump.plist

Tags, , , , , , , ,

%d bloggers like this: