You are not logged in.

#1 2016-09-24 02:02:11

Cadeyrn
Member
Registered: 2013-04-06
Posts: 170

[SOLVED] dbus 1.10.8-1 -> 1.10.10-3: sudo notify-send now impossible?

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

#2 2016-09-24 02:37:36

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,544

Re: [SOLVED] dbus 1.10.8-1 -> 1.10.10-3: sudo notify-send now impossible?

See if passing DBUS_SESSION_BUS_ADDRESS helps.

Offline

#3 2016-09-24 03:08:51

Cadeyrn
Member
Registered: 2013-04-06
Posts: 170

Re: [SOLVED] dbus 1.10.8-1 -> 1.10.10-3: sudo notify-send now impossible?

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

Board footer

Powered by FluxBB