brew install growlnotify-1.2.2 on OS X 10.6 (Snow Leopard)

The latest growlnotify in homebrew (1.3) fails on OS X 10.6 (Snow Leopard), because it’s a Lion-only binary.

marca@SCML-MarcA:/usr/local$ growlnotify 
dyld: Symbol not found: _kSecRandomDefault
  Referenced from: /usr/local/bin/growlnotify
  Expected in: /System/Library/Frameworks/Security.framework/Versions/A/Security
 in /usr/local/bin/growlnotify
Trace/BPT trap

Here’s how to fix it (thanks to https://github.com/mxcl/homebrew/issues/8316):

Easy access to TrueCrypt from the command-line in OS X

TrueCrypt on Mac OS X has a nice GUI, but if you’re a command-line afficionado…

Put this in your ~/.bashrc or similar file:

alias truecrypt='/Applications/TrueCrypt.app/Contents/MacOS/Truecrypt --text'

Then you can do stuff like:

$ truecrypt
Usage: Truecrypt [--auto-mount <str>] [--backup-headers] [--background-task] [-C] [-c] [--create-keyfile] [--delete-token-keyfiles] [-d] [--display-password] 
[--encryption <str>] [--explore] [--export-token-keyfile] [--filesystem <] [-f] [--hash <str>] [-h] [--import-token-keyfiles] 
[-k <str>] [-l] [--list-token-keyfiles] [--load-preferences] [--mount] [-m <str>] [--new-keyfiles <str>] 
[--new-password <str>] [--non-interactive] [-p <str>] [--protect-hidden <str>] [--protection-keyfiles <str>] 
[--protection-password <str>] [--random-source <str>] [--restore-headers] [--save-preferences] [--quick] [--size <str>] 
[--slot <str>] [--test] [-t] [--token-lib <str>] [-v] [--version] [--volume-properties] [--volume-type <str>] [Volume path] [Mount point]
...

or:

$ truecrypt --text --non-interactive --password=(password) --mount /Users/marc/Dropbox/TrueCryptVolume.truecrypt /Volumes/TrueCrypt

marc@hyperion:~
12:31:43 $ ls /Volumes/TrueCrypt
Audio/     Backups/   Documents/ Taxes/

or:

$ truecrypt --list
1: /Users/marc/Dropbox/TrueCryptVolume.truecrypt /dev/disk4 /Volumes/TrueCrypt

or:

$ truecrypt --dismount
$ truecrypt --list
Error: No volumes mounted.

My failed attempt at using autofs to automount TrueCrypt volumes on OS X

I was trying to make it as easy as possible to access our YNAB file which lives in an encrypted TrueCrypt volume. The idea was to have OS X autofs automount the TrueCrypt volume so that when YNAB starts and attempts to load our document, TrueCrypt launches and asks for the password and then the volume mounts. I never got it working smoothly. I also tried sticking the password in the script, which is less than ideal, but that didn’t work either.

The following almost works, but not quite. If you can get it working, please let me know.

First, /etc/auto_master:

marc@hyperion:~
09:30:48 $ cat /etc/auto_master
#
# Automounter master map
#
+auto_master		# Use directory service
/net			-hosts		-nobrowse,hidefromfinder,nosuid
/home			auto_home	-nobrowse,hidefromfinder
/Network/Servers	-fstab
/-			-static
/auto			auto_truecrypt

Then /etc/auto_truecrypt (which is executable):

marc@hyperion:~
09:30:53 $ cat /etc/auto_truecrypt 
#!/bin/sh

TRUECRYPT_VOLUME="/Users/marc/Dropbox/TrueCryptVolume.truecrypt"

key="$1"

if [ "$1" == "Truecrypt" ]; then
    echo "-fstype=truecrypt    :${TRUECRYPT_VOLUME}"
fi

And /sbin/mount_truecrypt:

marc@hyperion:~
09:30:58 $ cat /sbin/mount_truecrypt 
#!/bin/sh

echo "$0: Called with $@" >> /dev/ttys000
# echo open -W /Applications/TrueCrypt.app --args "$7" "$8" >> /dev/ttys000
# open -W /Applications/TrueCrypt.app --args "$7" "$8"
echo /Applications/TrueCrypt.app/Contents/MacOS/TrueCrypt --text --non-interactive --password=(password) "$7" "$8" >> /dev/ttys000
/Applications/TrueCrypt.app/Contents/MacOS/TrueCrypt --text --non-interactive --password=(password) "$7" "$8"

As is, when I have the script calling /Applications/TrueCrypt.app/Contents/MacOS/TrueCrypt with a password, I get:

$ cd /auto/Truecrypt
(Mac locks up with spinning beach ball)

The script actually locks up my MacBook Pro with OS X 10.6.8. The script is probably called in a kernel context or with some big lock and trying to launch a complex userland process from there creates some kind of deadlock. Well, that’s my guess anyway. So be careful — don’t try this if you’re not ready to reboot.

How to build MacVim with Python 2.7

The first few times I tried building MacVim, it kept linking with the system Python. I wanted it to use my Python 2.7 install. I finally found the right incantation:

./configure --enable-rubyinterp=yes --enable-pythoninterp=dynamic --with-python-config-dir=/usr/local/lib/python2.7/config

The --enable-pythoninterp=dynamic was the magic that I needed to make it work.

Quicksilver crash

I wasn’t even using Quicksilver when this crash report popped up.

Quicksilver crash report

Here’s the text of the crash dump.

This computer has been having a lot of kernel panics and crashing processes lately. I fear that it could be on the way out.

Can anyone recommend a program for checking the RAM (and possibly other components of a Mac)? On Windows, a number of years ago, I used Sandra – is there something comparable for the Mac?

Canon MP560 scanner software possibly causing OS X 10.6.6 crashes for me

A follow-up of sorts to my earlier post on Canon MP560 and Snow Leopard troubles.

I’ve actually seen a fair number of kernel panics lately on my MacBook Pro running OS X 10.6.6

This last one occurred last night while we were sleeping and this time, I actually looked at the stack trace in the morning. Note this part:

BSD process name corresponding to current thread: CIJScannerRegist

CIJScannerRegist almost undoubtedly refers to /Library/Image Capture/Support/LegacyDeviceDiscoveryHelpers/CIJScannerRegister.app which is almost undoubtedly something that was installed on the system by one of the numerous Canon software packages that I’ve installed for scanning support.

I am going to check to see if I have the latest stuff that Canon has available on their support site. Maybe this crash and the other problems I’ve had are fixed by a software update which I don’t have yet.

If not, then I fear that Canon has some problems in their drivers. I sent them this crash report too. I figure that if I am using the old version of their drivers, they will probably be able to tell and they will tell me to upgrade my software. If I’m using the latest software, then hopefully they will enter this as a bug into their system and hopefully can get something useful out of the crash report for fixing it.

The Canon MP560 printer/scanner and Snow Leopard: not a match made in heaven

I don’t know if it’s the hardware or the software or both, but this printer/scanner has been fairly irritating with Snow Leopard.

I’m quite disappointed, because I’ve had a lot of Canon printers and they have always been great. This one is great in many respects, but the networking works really badly for us.

Problems we have:

  • Sometimes when we try to print it works fine and sometimes OS X reports a “communication error”. Sometimes pausing and resuming the printer seems to get things working. Sometimes it doesn’t. Sometimes rebooting the printer and/or the computer does the trick. Even when this “communication error” occurs, I can still ping the printer, which tends to refute my earlier theory that the problem was the wireless network. This leads me to think the wireless network is working fine and something wonky is happening with the printer and/or the drivers.
  • Sometimes when I’m having problem like the above, I press the button to turn the printer off and it churns away doing its “power off dance of lights” for several minutes until I lose patience and pull the power cord. This really seems like a fairly serious hardware problem.
  • Sometimes when attempting to scan from the panel of the printer, it shows the computer as a destination; sometimes it does not. Rebooting the printer and/or the router sometimes seems to help.
  • Sometimes when attempting to scan from the panel of the printer and it actually shows the computer as a destination, it just doesn’t work. I select the computer as the destination, the printer thinks for a while, and then it asks again for a destination.
  • The MP Navigator EX software is fairly annoying and un-Mac-like.
  • As far as I can tell when you scan from the panel of the printer and send it to a computer, the filename always defaults to “IMG.jpg” or “IMG.pdf”. Renaming the file is pretty easy, but it’s somewhat tedious to look at the document to see what it is, because when you double-click it, rather than opening up in Preview.app, it opens a small MP Navigator EX window and it’s tedious to navigate in.
  • It seems that if you use Finder to manually rename files that are in the MP Navigator EX directories, MP Navigator EX gets very confused, so you have to do the renaming in MP Navigator EX.
  • When you look at the Canon support site to download drivers, it is incredibly confusing, because you pick OS X as the platform but not a particular version of OS X and you don’t pick your language. So you look at a long list of a lot of different confusing software packages for various versions of OS X and with English and Spanish mixed together. For some reason, there seems to be an almost ridiculous number of software packages and I’m still not really clear on which ones are needed for what — e.g.: the scanner driver, the ICA driver, the CUPS driver, the MP driver, Solution Menu, IJ Network Tool, Wireless Setup Assistant, IJ Setup Repair Tool, MP Navigator EX, and MP Navigator EX Opener.
  • A few minutes ago I tried to print something and the printer queue window has been stuck saying “Copying print data…” for several minutes now.

Is it just me or does this printer not work particularly reliably with Snow Leopard?