Stop iTunes from opening when a device is plugged in? Since re-installing OS X (10.8), every time I plug in an iOS device iTunes opens up and shows an error message:


  iTunes could not connect to the iPhone "..." because it is locked with a passcode. You must enter your passcode on the iPhone before it can be used with iTunes.


I plug in various devices all the time, just so I can charge them. I do not want them connected to iTunes, I definitely don't want iTunes storing a copy of the device's passcode (or however that works) on my mac, and some of the devices plugged in aren't even mine.

How can I stop this from happening? It doesn't happen when I'm booted into 10.7 on the same mac, with the same iOS devices.

I already have "Prevent iPods, iPhones, and iPads from syncing automatically" enabled in Preferences.

EDIT: this particular device also has "Open iTunes when this device is connected" turned off, so it seems to ignore that setting.
Under System Preferences → Users → [you] → Login Items → select iTunesHelper, then click the minus sign and log out/into your Mac.

No devices will cause iTunes to launch (that's the whole purpose of iTunesHelper).