[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DBUS signals?
[Thread Prev] | [Thread Next]
- Subject: Re: DBUS signals?
- From: BB <adamnt42@xxxxxxxxx>
- Date: Thu, 26 Sep 2024 08:07:29 +0930
- To: user@xxxxxxxxxxxxxxxxxxxxxx
On 26/9/24 7:30 am, Jussi Lahtinen wrote:
I took this code from here <https://gambaswiki.org/wiki/doc/dbus>:MySignal = New DBusSignal(DBus.System, "org.freedesktop.Hal.Manager") As "DBusSignal"Public Sub DBusSignal_Signal(Signal As String, Arguments As Variant[]) Debug Signal EndPlugging in/out USB stick or mouse does not give any signal. What this should detect? I have never used DBUS before... is there some other signal that would be good for testing purposes? I would like to see basic things working before doing anything else.The main goal right now is to detect system shutdown. And no, SIGTERM is not used for GUI applications anymore. I miss the old simple way.Jussi
You'll need to tell it the object and the signal-name and set "every" to true in the "new" parameters. See the gb.dbus wiki page for details.
I'd give you better details but my system doesn't use Hal.Manager The IDE gives some dbus introspection in the bottom tabs (I forget where).qDBusViewer (available on your distro?) is a good utility to look at what DBus is happening on your system.
Signals are possibly the hardest way to learn about the dbus component and dbus in general.
best wishes b
Re: DBUS signals? | Jussi Lahtinen <jussi.lahtinen@xxxxxxxxx> |
DBUS signals? | Jussi Lahtinen <jussi.lahtinen@xxxxxxxxx> |