You are not logged in.
I just upgraded, and now if notify-send is run as root at all, it doesn't work. If I manually type sudo su <username> -c 'notify-send something', it does nothing, but the exact same command without sudo (su <username> -c 'notify-send something') works. Same results with runuser. Same results if I had DISPLAY=:0 to the beginning, inside or outside of the -c command. Same results in a script, or in the terminal.
This is a big problem, because I use a script to startup and shutdown a QEMU/KVM/libvirt virtual machine, and said script has to run as root because of how virsh works, and said script talks to me with notify-send (so that I can launch it with a button instead of through a terminal). It can no longer do that last part, which is an extremely important part.
I'm on lightdm and XFCE.
Last edited by Cadeyrn (2016-09-24 03:09:20)
Offline
See if passing DBUS_SESSION_BUS_ADDRESS helps.
Online
That fixed it. Thanks! I had to set DBUS_SESSION_BUS_ADDRESS to what it is in a normal user session, AND I had to do that within a su <username> command, where before the update, simply running sudo notify-send would work fine. Not sure why I have to su as my own user now, but at least having to set that variable makes sense to me.
Last edited by Cadeyrn (2016-09-24 03:15:37)
Offline