2

I'm looking for a dbus-python equivalent of dbus-send --system --type=signal

When searching for dbus-python and sending signal, all the examples involve defining a dbus service clients can connect to (eg https://github.com/zyga/dbus-python/blob/master/examples/example-signal-emitter.py)

How does dbus-python allow to just simply send a signal?

rat_cake
  • 21
  • 3
  • Possible duplicate of [Use dbus to just send a message in Python](https://stackoverflow.com/questions/22390064/use-dbus-to-just-send-a-message-in-python) - I think this is what you're looking for. You're essentially never actually sending things, you're calling pre-defined functions on that pipe you're connecting to. Either you are the server and define those functions, or, when connecting to spotify's Dbus for instance you can call their play, pause and next functions. – Torxed Mar 16 '18 at 11:31
  • No, that one is about sending directed messages, I'm looking for broadcasting signals (https://dbus.freedesktop.org/doc/dbus-tutorial.html#signalprocedure) – rat_cake Mar 16 '18 at 11:40
  • My bad, I heard you say *"simply send a signal"* and figured that's pretty easy ^^ – Torxed Mar 16 '18 at 11:42

0 Answers0