Charles Lepple
2015-Sep-23 12:37 UTC
[Nut-upsdev] NOTIFYCMD shell script problem driving me NUTS
On Sep 22, 2015, at 11:27 AM, Thomas Charron <twaffle at gmail.com> wrote:> > On Tue, Sep 22, 2015 at 9:56 AM, John Hart <jsamcr at gmail.com> wrote: >> notify-send > > notify-send needs a DBUS_SESSION_BUS_ADRESS to work right. Look around for code snippets to get this.Ah, that notify-send. Another option is to launch the PyNUT app in your xsession (or equivalent) - it will also display GUI notifications. In Debian, it is in the package "nut-monitor". I haven't used this personally, though. Either way, please let us know what we can do to expand the NUT documentation on this topic. -- Charles Lepple clepple at gmail
John Hart
2015-Sep-23 14:24 UTC
[Nut-upsdev] NOTIFYCMD shell script problem driving me NUTS
Well, I have given upon the idea of using notify-send. It really doesn't do what I need to do. What I really want is a sudo permanent record of the upsmon events so that I can review them after the fact, so to speak. For instance, if the computer shuts down while I am away, I would like to review what happened. 'notify-send' won't do that. And I think the syslog is not adequate as it gets updated, and records lost, on a regular basis. So, I think I want the NOTIFYCMD script to simply output the messages, with date and time, to a file that can be reviewed after the fact. With my limited Linus skill set I'll be working on it for awhile. Thanks for your assistance. On Wed, Sep 23, 2015 at 6:37 AM, Charles Lepple <clepple at gmail.com> wrote:> On Sep 22, 2015, at 11:27 AM, Thomas Charron <twaffle at gmail.com> wrote: > > > > On Tue, Sep 22, 2015 at 9:56 AM, John Hart <jsamcr at gmail.com> wrote: > >> notify-send > > > > notify-send needs a DBUS_SESSION_BUS_ADRESS to work right. Look around > for code snippets to get this. > > Ah, that notify-send. Another option is to launch the PyNUT app in your > xsession (or equivalent) - it will also display GUI notifications. In > Debian, it is in the package "nut-monitor". I haven't used this personally, > though. > > Either way, please let us know what we can do to expand the NUT > documentation on this topic. > > -- > Charles Lepple > clepple at gmail > > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20150923/8b27c271/attachment.html>
John Hart
2015-Sep-23 14:47 UTC
[Nut-upsdev] NOTIFYCMD shell script problem driving me NUTS
Sending the events to a file turned turned out to be easier than I imagined. I just put the following in the NOTIFYCMD shell script: echo $(date) "$*" >> /home/john/upsmon_events.txt and the events are logged to the file. I did CHMOD 666 on the file so I can delete old events. Don't need notify-send. YEAH ! I do occasionally us the PyNUT app to run battery test and look at the health of the ups. And yes, if it is running I get 'notify-send' type messages. Butr again, if I am present it doesn't really matter. It's what happens when I am away that I want to know about. The 'logger' will get me what I want. Thanks, John On Wed, Sep 23, 2015 at 6:37 AM, Charles Lepple <clepple at gmail.com> wrote:> On Sep 22, 2015, at 11:27 AM, Thomas Charron <twaffle at gmail.com> wrote: > > > > On Tue, Sep 22, 2015 at 9:56 AM, John Hart <jsamcr at gmail.com> wrote: > >> notify-send > > > > notify-send needs a DBUS_SESSION_BUS_ADRESS to work right. Look around > for code snippets to get this. > > Ah, that notify-send. Another option is to launch the PyNUT app in your > xsession (or equivalent) - it will also display GUI notifications. In > Debian, it is in the package "nut-monitor". I haven't used this personally, > though. > > Either way, please let us know what we can do to expand the NUT > documentation on this topic. > > -- > Charles Lepple > clepple at gmail > > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsdev/attachments/20150923/59b335c3/attachment.html>
Dear All, Does anybody know the author of Voltronic USB driver , The protocol of some UPS was changed , If the author received this mail ,please contact me . Thank you very much . Best regards, Bluefish