Artix Linux Forum

Artix Linux => Applications & Software => Topic started by: MESYETI on 15 February 2022, 17:23:28

Title: notify-send does nothing
Post by: MESYETI on 15 February 2022, 17:23:28
im using Artix OpenRC with LXDE

i made the battery widget use notify-send when the battery has 5 minutes left but no notification sends and so my battery keeps dying

this is the command it uses
notify-send "Battery low" --icon=battery-caution
Title: Re: notify-send does nothing
Post by: qontinuum on 15 February 2022, 20:35:49
What happens if you manually run the command?
Title: Re: notify-send does nothing
Post by: just on 16 February 2022, 09:23:56
@MESYETI

Does battery widget execute notify-send command with elevated (root) privileges?
Title: Re: notify-send does nothing
Post by: strajder on 16 February 2022, 12:50:02
im using Artix OpenRC with LXDE

i made the battery widget use notify-send when the battery has 5 minutes left but no notification sends and so my battery keeps dying

this is the command it uses
notify-send "Battery low" --icon=battery-caution
Those are the default settings.

Try increasing the "Alarm time" to some value larger than 5 minutes. Also, your battery level hardware detection could be not calibrated correctly or your battery can be failing (it happens). Allow the battery to discharge at least once, then charge it to full, which should re-calibrate the detection in your hardware. The "time until the battery is drained" depends on various factors and is simply not something that can be accurately determined.

Edit: It seems that notifications in LXDE aren't shown/handled at all; running
Code: [Select]
notify-send Test
in LXDE LiveISO doesn't produce any visible effect, and also produces no errors in a terminal emulator.

Edit 2: It seems that there is no notification daemon running in the default LXDE collection. As a workaround, you can install any notification daemon, for example dunst or lxqt-notificationd and run it (in background), preferably from your startup file. As an example, for testing purposes, after installing lxqt-notificationd
Code: [Select]
lxqt-notificationd &
notify-send Test
should display a notification window.

Edit 3: Installing notify-osd or dunst doesn't require starting the daemon manually. It is started through dbus.
Title: Re: notify-send does nothing
Post by: nous on 16 February 2022, 17:52:48
Edit 3: Installing notify-osd or dunst doesn't require starting the daemon manually. It is started through dbus.
Thanks for troubleshooting this, I'll put dunst in the LXDE profile.
Title: Re: notify-send does nothing
Post by: MESYETI on 17 February 2022, 22:21:50
What happens if you manually run the command?
nothing
Title: Re: notify-send does nothing
Post by: MESYETI on 17 February 2022, 22:22:14
Those are the default settings.

Try increasing the "Alarm time" to some value larger than 5 minutes. Also, your battery level hardware detection could be not calibrated correctly or your battery can be failing (it happens). Allow the battery to discharge at least once, then charge it to full, which should re-calibrate the detection in your hardware. The "time until the battery is drained" depends on various factors and is simply not something that can be accurately determined.

Edit: It seems that notifications in LXDE aren't shown/handled at all; running
Code: [Select]
notify-send Test
in LXDE LiveISO doesn't produce any visible effect, and also produces no errors in a terminal emulator.

Edit 2: It seems that there is no notification daemon running in the default LXDE collection. As a workaround, you can install any notification daemon, for example dunst or lxqt-notificationd and run it (in background), preferably from your startup file. As an example, for testing purposes, after installing lxqt-notificationd
Code: [Select]
lxqt-notificationd &
notify-send Test
should display a notification window.

Edit 3: Installing notify-osd or dunst doesn't require starting the daemon manually. It is started through dbus.
ok thanks