-tm-;610418 Wrote: > Just a follow up from my perspective: I migrated to ReallyPreventStandby > from SvrPowerControl on 7.5.3 and latest Mac OS X (iMac, Intel). > > It does work! Thanks for the update. It took half a day to work > properly, similarly to the problem danco posted - there seem to be > magic healing hands under the hood of OS X ;-) > > Although ReallyPreventStandby in its current state does what I need, I > am wondering why you took the route developing a standalone app? As > posted previously here: > http://forums.slimdevices.com/showpost.php?p=592731&postcount=1507, an > AppleScript or shell command using pmset should have been fine as > well. > > You could easily read out the current users energy settings and save > these, disallow sleep mode while playback (/usr/bin/pmset force sleep > 0) and reset energy settings to saved values while players are idle. > It's also possible to control display sleep using pmset. > > While evaluating ReallyPreventStandby I noticed that TimeMachine > actually uses this same technique. Just hit pmset -g in the terminal > while TimeMachine is running and you'll see that the backup process has > imposed a "sleep 0" on the energy settings. > > Just an idea... I think what drove my design decisions with ReallyPreventStandby was wanting to have it work as much like the stock Windows mechanism as possible. Since the Windows implementation doesn't alter PM settings, I didn't want to do that under linux or OSX either. Unlike the Windows implementation, there didn't seem to be readily available perl bindings to the necessary kernel functions. So I had to settle for executing an external app.
But on the face of it, there would be absolutely nothing wrong with the approach you suggest. ReallyPreventStandby would have to be tweaked so that a one-time "finally idle" command would be fired off to put the PM settings back again. And I actually have code stubs in the plugin to handle this as I was thinking that I'd like to accommodate this approach. I think that there would have to be entries put in the sudoers file for the inhibit & de-inhibit scripts. RPS under linux already requires this. Perhaps you'd like to try your hand at a simple shell script that: 1). reads the state of the user set PM settings and outputs the correct "de-inhibit" script. 2). sets PM sleep to 0. The only danger in this approach would be if the user does a hard-reboot of the mac or if SBS otherwise crashes. In those cases, the user's PM settings will be lost. One way to mitigate that would be for ReallyPreventStandby to always execute the "de-inhibit" script on startup...thus restoring the previous settings. Another issue might be: what if the user changes PM settings after RPS has disabled them? Then the new settings are lost when the de-inhibit script gets run. (Unless the de-inhibit script can sense that changes have been made...and would then decline to overwrite them.) Anyway...there seem to be a few wrinkles to this approach (unless I've misinterpreted your intent.) Just doing an inhibit seems simpler for the moment. I may revisit this when the next version of Ubuntu gets released at the end of April. Major chunks of Gnome are supposed to be chopped out of the 11.04 Natty release. So my linux inhibit app may be broken there anyway. And who knows what Lion will drag in this Summer.. -- gharris999 ------------------------------------------------------------------------ gharris999's Profile: http://forums.slimdevices.com/member.php?userid=115 View this thread: http://forums.slimdevices.com/showthread.php?t=48521 _______________________________________________ plugins mailing list plugins@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/plugins