Grab DBus Notifications lazarus / 21-General ---------------------------------------------------------------------- McClane · 2021-01-13 19:58 Hi, I'm new to DBus and I wanted to learn a little. I want to make a loop and get all notifications, especially from Rhythmbox (linux audio player), and from what I've been reading, I really don't know how to achieve it. A little help would be appreciated. Thanks! ---------------------------------------------------------------------- MarkMLl · 2021-01-13 20:41 I've looked at it half-heartedly a number of times but have never been able to work out what the "library de jour" was or what IPC mechanism the low-level implementation used. I've used netlink for udev hotplug messages and found it rather a no-brainer, but suspect that the two have very little in common. I'd suggest working out what flavour of D-Bus your system uses, and investigating libdbus or whatever. /If/ it uses unix domain sockets, I suspect the major problem will be working out how to tell the daemon responsible for distributing messages that you want some, since it's not generally possible for multiple processes to listen on the same socket (they're very similar to UDP). MarkMLl ---------------------------------------------------------------------- McClane · 2021-01-13 21:02 I'm trying to adapt the examples on the wiki (https://wiki.lazarus.freepascal.org/FPC_and_DBus) but I don't understand them and I want to adapt them to get rhythmbox notifications. The properties example is not working :S ---------------------------------------------------------------------- MarkMLl · 2021-01-13 21:16 I didn't write that and would much rather not get too deeply into it right now since it's a long way from what I'm currently doing... doesn't work /how/? What distro are you using? What IPC mechanism does that distro use for its D-Bus implementation? MarkMLl ---------------------------------------------------------------------- McClane · 2021-01-13 21:29 I use Peppermint 10 (kernel Linux 5.0.0-36-generic i686) based on Ubuntu Bionic. I don't know what IPC, sorry. ---------------------------------------------------------------------- MarkMLl · 2021-01-13 22:00 Quote from: McClane on January 13, 2021, 10:29:47 pmI use Peppermint 10 (kernel Linux 5.0.0-36-generic i686) based on Ubuntu Bionic. I don't know what IPC, sorry. So that probably means it's ultimately Debian-based. Doesn't work /how/? Does it compile? What goes wrong? MarkMLl ---------------------------------------------------------------------- McClane · 2021-01-13 23:00 It works now with this example Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i msg := dbus_message_new_method_call('org.freedesktop.Avahi', '/', 'org.freedesktop.Avahi.Server', 'GetNetworkInterfaceNameByIndex');but I can't adapt it to org.gnome.Rhythmbox3 ---------------------------------------------------------------------- MarkMLl · 2021-01-14 08:49 Make sure you put a note on the wiki page. MarkMLl ---------------------------------------------------------------------- sstvmaster · 2021-01-14 09:21 Maybe helpful: https://unix.stackexchange.com/questions/46301/a-list- of-available-d-bus-services