Hi.
I think you should get interested in SrvPowerControl again. My
suggestion is the following:
- remove power management from the machine (disable the desktop/gnome
daemon, but try to keep acpid). Now the server will never sleep.
- install srvPowrControl. Now the server will be forced to sleep when
the SBs are not playing.
- add an ad-hoc script that watches the activity of the other services
you're interested in. I suppose watching opened files and network
activity would be what you want. When your script sees activity, it
could block srvPowerControl from trying to shutdown the machine. When
there is no more activity, release the block.
This should work ok.

If the system is also a Desktop, then removing all PM may not a great
idea, esp. if you loose the screensaver (and still use a CRT). So you'd
need to fix the issue in a bit more subtle way.
This aside, you can use the same trick of blocking SC until the user is
logged in. srvPowerControl does this on MacOS and it works great. Until
you're logged-in, even if there is nobody watching a movie or playing
music, and for 20 minutes you can't decide how to start that letter...
the machine will not shutdown on you.
AFAIK there is no X11 equivalent, but GDM (the Gnome login window) has
provision for setting a srvPowercontrol block at login, an remove it at
logout. 

This is a recipe, I tried it briefly (on a xubuntu VM) and it should
work as well as it does on a mac.
In file /etc/gdm/PreSession/Default, replace the last line "exit 0"
with this:
Code:
--------------------
    SCIp='127.0.0.1'
  CLIPort='9090'
  LOGGER=/usr/bin/logger
  NC=/bin/nc
  $LOGGER -i "loginhook"
  /bin/echo srvrpowerctrl setblock Logon_block viacli | nc -w 3 $SCIp $CLIPort
  exit 0
--------------------

In file /etc/gdm/PostSession/Default, eplace the last line "exit 0"
with this:
Code:
--------------------
    SCIp='127.0.0.1'
  CLIPort='9090'
  LOGGER=/usr/bin/logger
  NC=/bin/nc
  $LOGGER -i "logouthook"
  /bin/echo srvrpowerctrl clearblock Logoff_clearing_block viacli | $NC -w 3 
$SCIp $CLIPort
  exit 0
--------------------


If you're interested, I suggest you check out the srvPowerControl
thread in 3rd Party Plugins and ask for assistance there.

HTH


-- 
epoch1970
------------------------------------------------------------------------
epoch1970's Profile: http://forums.slimdevices.com/member.php?userid=16711
View this thread: http://forums.slimdevices.com/showthread.php?t=68248

_______________________________________________
discuss mailing list
discuss@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/discuss

Reply via email to