After many unsuccessful attempts to escape, including remote screen sharing, shortcut keys to disable screen sharing (which again I don't know why they don't work in Lion) we succeeded with this plan and this might help you if all else fails. I don't know if rebooting would help, he didn't want to risk losing his code so it was only last resort.
- On another Mac I wrote and tested an AppleScript. I saved it as plain text and made it executable using chmod 0755 on the file.
- We ssh'd it to his computer so he could execute it.
- He started Terminal using Spotlight.
- He pressed Command+N several times until a Terminal window cascaded itself into view.
- He ran the script file and presto, it worked.
#!/usr/bin/osascript tell application "System Events" to set frontmost of process "System Preferences" to true tell application "System Events" tell process "System Preferences" tell radio group 3 of tab group 1 of window 1 tell radio button 2 click end tell end tell end tell end tell
[crarko adds: Nothing really earthshaking here, but I'm a soft touch for persistence and creativity in problem solving.]

