gharris999;380887 Wrote:
> For now, I think the most immediate need is to extend the rtc wake alarm
> to OSX. I haven't even begun to look into this. Hopefully, all that
> would be required would be to add another case statement to your OSX
> helper script. Would you be willing to look into that?
I did a "man pmset" and this quick test:
# sudo pmset schedule wake "01/08/09 12:25:00" sc
# sudo pmset sleepnow
and I got the mac to sleep and wake automatically. Doesn't work without
sudo.
So I went to 'macosxhints'
(http://www.macosxhints.com/article.php?story=2005080905050737) and
came up with this bit of (apple)script ...
Code:
--------------------
#!/bin/sh -e
/usr/bin/osascript -e 'do shell script ("pmset schedule wake \"01/08/09
12:52:00\" srvPowerControlPlugin") password "your_admin_acct_password" with
administrator privileges'
/usr/bin/osascript -e 'tell application "System Events" to sleep'
exit
--------------------
... where the "password xxx with administrator privileges" in fact
automates/replaces the sudo dialog. There's an "user" option as well;
My account has admin privileges so I didn't try switching accounts.
Now I guess we need to add some ugly date statement to convert your
timestamp to the one expected by pmset. What is the format ? epoch
seconds ?
Also I wonder if this shell exec with admin privs formula wouldn't
allow something like 'do shell script ("pmset sleepnow")' to work even
when all interactive users have logged out (a current limitation you've
pointed already).
If so, the need for a separate root daemon I mentioned in my last
message goes mostly away.
I tried this on OS X 10.5.5.
--
epoch1970
------------------------------------------------------------------------
epoch1970's Profile: http://forums.slimdevices.com/member.php?userid=16711
View this thread: http://forums.slimdevices.com/showthread.php?t=48521
_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins