gharris999;355839 Wrote: > Epoch: I've started working with your srvPowerControl_MacOSX.sh script > on my mac mini. I'm finding that, even if SqueezeCenter is set to > start on boot, the script is only executable by SrvrPowerCtrl if the > user is logged in. If the mac is positioned at the user login screen, > I can still use the SrvrPowerCtrl menu and attempt a restart or > whatever. But the attempt fails. When I login, the attempts succeed. > > Do you have any ideas about this? I'm a total mac noob. In the BSD world I don't weight much, and my Darwin fares even worse.
My understanding of the situation is that : - since some revision in the 10.4 series, the login screen stopped being apple-scriptable. Damn hackers, too many Macs in the schools and Universities... - down to the system level, process launching is seriously secured. A process that is run at boot without a GUI is called a launch deamon. But maybe SC is started by an Agent, which has a GUI (or not in the very special case of the login window.) Having a hook to the process launching SC and asking it to kindly to suspend the machine, reboot, shutdown, or stop would be the way to go I believe. A reachable goal would to write a Launch Daemon (a script) that runs at root and tries to shoot down SC on demand (hoping it doesn't fight back :-); For reboot and shutdown the usual unix commands are to be used. For sleep that would be "pmset sleepnow" (see man pmset); there is no hibernate on macs, except when the battery empties completely on laptops. For communication between the deamon and SC (the plugin) I guess a unix pipe would be okay. Or a tcp socket, secured somehow. Or a big fat warning about the size of the security hole users will create if they install this stuff... After writing the thing comes packaging time. Mac users know zilch about the Unix system below, and usually have high expectations. I have strictly no idea on how to create an installer. Now you see why I hacked a wrapper around a simple AS command... There is a nice yet sobering series of articles about the Mac boot process at the'ADC' (http://developer.apple.com/DOCUMENTATION/MacOSX/Conceptual/BPSystemStartup/BPSystemStartup.html#//apple_ref/doc/uid/10000172) site. -- 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
