Re: AppleScript to Unlock Computer stopped working in 10.6
Re: AppleScript to Unlock Computer stopped working in 10.6
- Subject: Re: AppleScript to Unlock Computer stopped working in 10.6
- From: Deivy Petrescu <email@hidden>
- Date: Wed, 30 Sep 2009 10:46:19 -0400
On Sep 29, 2009, at 1:58 PM, Greg Rumple wrote:
I recently upgraded all my Mac's from 10.5 to 10.6, and have been
working happily until I discovered a small problem.
As I said, I have several Mac's in my household, including one in my
children's room. This Mac stays locked most of the time, but when
they do earn the right to use it, I typically don't walk into their
room, I instead login from my computer via SSH and used the following
scripts to either Lock or Unlock their computer.
lock
------
tell application "ScreenSaverEngine"
activate
end tell
unlock
--------
tell application "System Events"
if exists process "ScreenSaverEngine" then
tell security preferences
set properties to {require password to wake:false}
end tell
tell application "ScreenSaverEngine" to quit
delay 5
tell security preferences
set properties to {require password to wake:true}
end tell
end if
end tell
The unlock script isn't identical to the way I had in 10.5, as I have
been plugging away at it, but the concept is the same. Disable the
require password option, tell the ScreenSaver to quit, wait 5 seconds,
re-enable the require password option. On 10.6 this doesn't just
fail, it actually puts the computer into a black screen mode, where
you can't actually do anything (it's like a black screen of death, I
haven't found a way out of it at all from the keyboard). I have found
out that if I re-run the lock script I can get it back out of the
black screen mode. I have also verified that my script does indeed
change the require password option, it just seems that quitting the
ScreenSaverEngine isn't alone enough to get the desktop back once the
computer has slept the screen, though I haven't tested this with the
password option disabled to see if it comes back alive with this
script when that is disabled before the screensaver is activated.
I'm curious if anyone has any ideas of how I can get this working
under 10.6, as this was quite a great feature for me as I can even do
this while I'm at my office at work, but now I physically have to
enter my kids bedroom and unlock their computer, which while I'm at
work, isn't exactly an option.
Thanks in advance.
Greg
While this is not exactly the answer to your question, it might be a
better solution overall.
This has been there, I think since Tiger, but I am not sure. certainly
since Leopard and it is better in SL.
On your kids computer open the sharing panel in system preferences and
click on remote management.
Set your administrative user as the user that can remotely control
your kids' computer and click on the options you want .
From your office select share screen in the finder window and select
your kids computer.
You can do everything you want from your office.
And better, you can always keep and eye on what your kids are up to!
Hope this helps
Deivy Petrescu
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden