[Lubuntu] Capture "wall" messages for display on desktop?
lubuntu at prpcompany.com
Sat Oct 27 19:50:31 UTC 2012
On 10/27/2012 1:36 AM, Jonathan Marsden wrote:
> On 10/26/2012 04:52 PM, John Hupp wrote:
>> The only problem is that it only posts warning messages to the
>> wall command, which outputs only to console sessions. ...
> In my experience, apcupsd is a *lot* more configurable than that -- did
> you read its documentation or its scripts before posting?
> You can create scripts for each class of event (onbattery, offbattery,
> etc.) handled by /etc/apcupsd/apccontrol that do *whatever* you want
> them to do -- turn the message into audio and speak it using a speech
> synth, if you really want :)
> You don't even need to edit /etc/apcupsd/apccontrol to do this, it will
> notice that your custom scripts exist, and use them instead of its
> internal default actions.
[Newbie sent scurrying to dig into the "Customizing Event Handling"
section of the apcupsd manual, and for some general research on desktop
OK, I found out that notify-send is a common desktop notification tool,
and that one installs the libnotify-bin package to get it. I did so.
I have now also created the shell script /etc/apcupsd/annoyme. It is
owned by root. I used the Properties: Permissions sheet to give everyone
Read & Write permission, and marked it executable.
The contents of annoyme:
notify-send -u critical -t 5000 "The computer is running on
battery." "It will shut down shortly. Please save your work and log off."
Running this script manually pops up a nice warning on the desktop for 5
But when I pull the plug for a UPS test, I do not get any desktop
warnings, though apcupsd powers down the PC when expected. But if I log
into a console during that time, I see the default onbattery and annoyme
wall messages. As I understand it, apccontrol should run my custom
annoyme script before running its own default annoyme command.
I have not modified apccontrol.
Anyone recognize what the problem is?
I could add parameters from my current configured-for-testing apcupsd.conf:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Lubuntu-users