Notify-send issue

notify-send "Header" "Content" --icon network-idle
su -l user -c 'notify-send "Header" "Content" --icon network-idle'

I’m using the latest updated Qubes OS 4.1 release. Neither of these commands work when called in /rw/config/rc.local or /rw/config/qubes-firewall-user-script.
Please advise.

1 Like

for me, notify-send doesn’t work in fedora 36 or 37.
Gives dbus error, “The name is not activatable”

The command must be done in dom0.

I guess that also solve the OP issue.

It doesn’t need to be run in dom0, I don’t have any issues running notify-send from appVMs.

I don’t think it will work from rc.local, the script is run before xorg is started, and I think you need xorg to show the message.

I have, but as usual, minimal template (I answered too quickly).

It’s then a missing package: libnotify ?

Well it’s not, don’t know why I have thought that, as I do have the DBus error
and therefore the package.

Its probably the notification daemon that is missing or not started (it should auto-start).

To get notification from (fedora) app qubes, install notification-daemon and libnotify (already installed).
Just tested fom fresh fedora 37 minimal template.


In such cases, I often use an until loop


until sudo -u user notify-send Hello
    sleep 1 && continue

szz9pza said it doesn’t start because dbus isn’t ready.

You can wait and see if it becomes available, but you probably need to set up the dbus address variable.

You can also make an .desktop file in /home/user/.config/autostart and use that file to execute your shell script, that is what I normally do when I need to run something that requires xorg to be up and running.

It’s more than notification-daemon and libnotify; something else has changed in fedora 36,37.

I found out during upgrade, because whatever it is broke the CLI VPN script

It calls notify-send. When that fails, openvpn crashes out.

Had to comment out those notify-send lines in script to make openvpn work.

Of course, now it doesn’t notify about link status.

ps says notification-daemon running.

notify-send is installed and fully functional in fedora 37.
There must be an error in that script in calling it, rather than
anything else.
As user, can you confirm this with notify-send 'test' 'test'

Post the section of the script you have commented out, and how you are
calling the script.

I never presume to speak for the Qubes team. When I comment in the Forum or in the mailing lists I speak for myself.

I use the qubes-vpn-handler script from here:

and had to comment out the lines with notify-send and the else line to keep it working after f35.

Did you confirm that notify-send was working, as I asked?

I asked you to cite the lines you comment out, rather than me have
to search for them.
I also asked how you are calling the script.