0

I would like to use dbus to signal other instances of the same family of applications. It seems that to issue a signal I must execute a g_bus_own_name, emit the signal when the name is acquired, then g_bus_unown_name. This seems like a bit of palava just to send a signal. When the name is acquired, another instance of the application will hang waiting for this instance to 'unown' the name.

The deprecated way of dbus_message_new_signal/dbus_connection_send was much more straight forward.

Is there a simpler way to send the signal (without owning the name).

Philip Withnall
  • 5,293
  • 14
  • 28
Michael K.
  • 21
  • 1
  • 5
  • I think the answer to to abandon the high level gdbus stuff and use the low-level routine .. `g_dbus_connection_emit_signal` – Michael K. Mar 17 '19 at 18:54

1 Answers1

0

Yes, as Michael K says, use g_dbus_connection_emit_signal(). You only have to own a well-known name if you want other users of the bus to be able to address your application by that well-known name, rather than a unique name which changes every time you connect to the bus.

Philip Withnall
  • 5,293
  • 14
  • 28