Issue with notify-send

Forum Forums New users New Users and General Questions Issue with notify-send

  • This topic has 6 replies, 4 voices, and was last updated Apr 17-11:01 pm by ctcx.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #71094
    Anonymous

      Using AntiX 21 x64 base.

      I’d like to try setting a low battery automatic notification using just libnotify if possible.

      I noticed libnotify4 and libnotify-bin are already installed. So I tested “notify-send” command with several options… nothing appears or happens at all.
      Tried installing notify-osd package, still nothing, even when I read somewhere here in the forum that this was seemingly enough to make it work…

      I think I’m actually a bit lost overall at doing this, even after doing internet search.
      Is it that I really need to install something else, like dunst package, for it to work?
      Must I also install acpi package to get battery level, or can I somehow use window manager’s monitors, or something?

      Thanks beforehand.

      #71113
      Moderator
      BobC

        Please try using Forum > Search Forum for in this case notify-send. The answer is there already, just need to take a few minutes to search for it.

        It looks like you need dunst installed.

        https://www.antixforum.com/forums/topic/fluxbox-quick-launcher-screen-tearing/#post-50648

        PS: Here is another using Herbe to save resources.
        https://www.antixforum.com/forums/topic/how-to-have-system-notifications-in-antix-without-using-system-resources/

        • This reply was modified 2 years, 6 months ago by BobC.

        Daily driver distro https://www.antixforum.com

        #71115
        Anonymous

          Apologies sir.

          I do normally search the forums before asking certainly, and I think I had seen those posts (or similar ones); but I think I didn’t read them deeply because I thought there was a way without dunst or herbe…

          But, my bad anyway.

          Sorry again. Thanks.

          #71117
          Moderator
          BobC

            It’s ok, I’m not mad or anything. I’m just trying to show you how to become more self sufficient. In the past, others have done the same for me.

            Give a man a fish, and you feed him for a day.

            Teach a man to fish, and you feed him for a lifetime.

            Daily driver distro https://www.antixforum.com

            #71149
            Moderator
            Brian Masinick

              Apologies sir.

              I do normally search the forums before asking certainly, and I think I had seen those posts (or similar ones); but I think I didn’t read them deeply because I thought there was a way without dunst or herbe…

              But, my bad anyway.

              Sorry again. Thanks.

              No problem; We don’t mind helping people out, especially if the information has been examined and the written information is unclear; we certainly want to make information clear, easy to access and easy to understand as much as we can. We do appreciate people attempting to read and learn, but we’re always available to assist in understanding concepts that are new or “foreign” in some way. Thank you for sharing your comments.

              --
              Brian Masinick

              #71187
              Anonymous

                Thanks everyone for your advise (and patience).

                Precisely, I searched more deeply this time, and found a number of things I was totally ignorant of.

                –Yes, notify-send needs a “notification daemon” for its messages to be displayed. Seemingly AntiX base doesn’t ship one by default (no idea about AntiX full…), so one must be installed in this case. There’s a number of them; some of them are started right after installation, some others are not (which explains part of the OP here).
                IIRC, one “lightweight” daemon was mate-notification-daemon, albeit dunst seemed indeed like a “lighter” and also functional one.

                –Certainly there have been several different approaches discussed here in the forums. One that caught my attention was this one, which uses YAD for the “notifications”:
                https://www.antixforum.com/forums/topic/no-notifications-on-antix-for-battery/#post-20207

                Now I was just wondering,

                Couldn’t there be a way to “modify” IceWM’s APM battery applet to make it launch a command for notification? (notify-send, YAD, or other…)

                AFAIK, battery level notifications should already be “mandatory” on all distros, at least for laptops. Is there a reason why it was decided not to include one by default here?

                Thanks again.

                #81623
                Member
                ctcx

                  Just would like to share the “battery notificator” I currently use since a while ago, which is just based on the one mentioned in link in above post, albeit a bit simpler:

                  # Low battery warning
                  while true; do
                    sleep 60
                    grep -q Discharging /sys/class/power_supply/BAT0/status || continue
                    [[ $(cat /sys/class/power_supply/BAT0/capacity) -le 10 ]] && \
                    yad --center --title="Warning" --text="Low battery" --text-align=center
                  done

                  Put it in ~/.desktop-session/startup. Just as Xecure explained back then in another thread, if put just at the end of file, it doesn’t matter whether it’s set to be run on background or not (i.e., the (…)& construct) in that case.

                  Thanks again.

                Viewing 7 posts - 1 through 7 (of 7 total)
                • You must be logged in to reply to this topic.