On Wed, Oct 31, 2012 at 03:28:04PM -0400, John Hupp wrote: > For a Lubuntu LTSP network powered by a UPS, during a power outage I want to > notify all users in all X sessions with a popup message saying that the system > is running on battery and about to be shut down. ... > I imagine that there is already a developed method for handling a job like > that, using either notify-send or something else. Can anyone point the way?
You could start something from /etc/X11/Xsession.d/ that runs in the background and waits for the presence of a file, and if the file is present, displays the contents of the file. Drop something like this in /etc/X11/Xsession.d/60-notify-of-ups-shutdown: check_and_notify(){ # Sleep for 10 seconds while sleep 10 ; do # check for file... if [ -f /var/run/ups-shutdown ]; then # Display file to user. xmessage -file /var/run/ups-shutdown return $? fi done } check_and_notify & And then your UPS monitoring software should write something to /var/run/ups-shutdown... There's probably a more elegant way, but hopefully that helps as a simple proof of concept. live well, vagrant ------------------------------------------------------------------------------ LogMeIn Central: Instant, anywhere, Remote PC access and management. Stay in control, update software, and manage PCs from one command center Diagnose problems and improve visibility into emerging IT issues Automate, monitor and manage. Do more in less time with Central http://p.sf.net/sfu/logmein12331_d2d _____________________________________________________________________ Ltsp-discuss mailing list. To un-subscribe, or change prefs, goto: https://lists.sourceforge.net/lists/listinfo/ltsp-discuss For additional LTSP help, try #ltsp channel on irc.freenode.net