5

I've made a client - server system in zmq which would help send mass notifications to people logged onto all the machines on the network.

The client daemons are running under root on all of the different machines. However when a message is sent to one such client and when it invokes 'notify-send' the message doesn't pop up on the user desktop. The error I see is:

(notify-send:8670): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed

I believe this is because a notify-send can only be sent via a graphical interface. Or via running the daemon under that particular user and not as root and setting DISPLAY=:0

1) Is there a way to send a notification like notify-send or kdialog etc running the client daemon under root and not the user itself?

2) And are there other ways to achieve this more elegantly?

3) And, Can dbus be employed in any way to do this?

user2252999
  • 183
  • 2
  • 10

1 Answers1

1

You can su in as the user, set the DISPLAY=:0 and run notify-send. I've done this before.

tekknolagi
  • 10,663
  • 24
  • 75
  • 119