notify-send uses the session-dbus to send the notification to a notification daemon. It needs the environment variable DBUS_SESSION_BUS_ADDRESS to have the correct value ('unix:path=/run/user/1000/bus' on my system; '1000' is my numeric user id) and it must be called by the user (the dbus protocol has some authentication mechanism in place). So what you should try in your script is something like
Code:
su -c "DBUS_SESSION_BUS_ADDRESS='unix:path=/run/user/UID/bus' notify-send 'blah'" - USER
Replace UID and USER to fit your situation.
Holger
Bookmarks