Apple - How to unlock a Mac that's been locked with Apple Remote Desktop's "curtain" screen lock
I don't have a Mac with ARD to test this, but this sunshine-ard utility suggests it can fix the problem. From a quick glance at the source code, it just sends a CFNotificationCenter message to quit the curtain mode.
I'm not sure if there's a way to hook in to the ARD logout process to have this run every time you disconnect your session, but at the very least you could run it via SSH as necessary.
This fastest solution I have found is to make a SSH connection to a admin account on the remote computer that is locked.
ssh "adminuser"@ip.address/or.computername
Type: ps -ax | grep AppleVNCServer
You want the line that reads something like
/System/Library/CoreServices/RemoteManagement/AppleVNCServer.bundle/Contents/Support/LockScreen.app/Contents/MacOS/LockScreen -session 256 -msgHex
Jot down the PID that is to the left of this.
then enter:
sudo kill -9 "PID"
This will force restart the lock screen and make it available again.
I know this is like the post above just explained. It is also done on two 10.8.2 machines running ARD 3.6.1.
Apple provides an example of how to script the lock screen in Chapter 9 of the ARD Admin Guide.
As you already have osascript
access, I would send the unlock command.
-- Start commanding the local copy of Remote Desktop
tell application "Remote Desktop"
-- decide which list to perform this on, in this case it's called
"WorkMac"
set these_computers to computer list "WorkMac"
-- unlock the screen when finished
execute (make new unlock screen task) on these_computers
end tell