<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Aug 19, 2015 at 4:47 PM, Ian Geiser <span dir="ltr"><<a href="mailto:igeiser@devonit.com" target="_blank">igeiser@devonit.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt"><div><span class=""><p class="MsoNormal">On Wed, Aug 19, 2015 at 2:55 PM, Ian Geiser <<a href="mailto:igeiser@devonit.com" target="_blank">igeiser@devonit.com</a>> wrote:<br>> Greetings, I am struggling with search queries here so I need to ask this outright. "what is the role of dbus going forward?" Is dbus the preferred way going forward? Or should things really be using sd-bus.h instead?<u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">D-Bus is not going away, only its internals are being replaced. Existing clients will continue working.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">kdbus replaces the "dbus-daemon" router and the Unix socket transport with a direct kernel API, but all existing programs can still connect to it via systemd-bus-proxy (at least until they get native kdbus support).<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">sd-bus.h is only a library for writing DBus clients & servers. Here the choice is still up to you – sd-bus has better performance and native kdbus support (and a better API than e.g. dbus-glib), but if you're writing programs in GTK or Qt or EFL, then you'll still want GDBus or QtDBus or Eldbus.<u></u><u></u></p></div></span><div><p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><b><i><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">[igeiser] </span></i></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Awesome, thanks for the clarification<b><i><u></u><u></u></i></b></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p></div><span class=""><div><p class="MsoNormal">(I've heard GDBus already has native kdbus support in development, too.)<u></u><u></u></p></div><div><p class="MsoNormal"><br>> I manage an embedded product that leverages system heavily at the system level, but I want to expand this into the user session. The main focus is to use "scopes" for classification and control of specific application's process groups. The rub here is that while system-run can do this if I try to do this via dbus the org.freedesktop.systemd1 is missing from the user session no matter what or where I set my DBUS_SESSION_BUS_ADDRESS. I am using systemd 224.<br><br>Right, systemd will not be accessible on a session bus, since it runs <i>outside</i> the session.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">So instead you'll find it on the <i>user</i> bus, which is available by default on kdbus systems, but can be configured with dbus-daemon as well. The current devel branch (1.9.20) of dbus-daemon installs the --user units dbus.socket and dbus.service necessary for this. The user bus address is "kernel:path=/dev/kdbus/$UID-user/bus;unix:runtime=yes" (if I got the syntax right?), or "kernel:path=/dev/kdbus/$UID-user/bus;unix:path=/run/user/$UID/bus".<u></u><u></u></p></div></span><div><p class="MsoNormal"><b><i><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">[igeiser] </span></i></b><span style="color:#1f497d">Can I access it using the path directly in 1.8.x using ”unix:path=/run/user/$UID/system/private”? Or is that what the 1.9.20 allows to happen?</span></p></div></div></div></div></div></blockquote><div><br></div><div>Not quite; …/systemd/private is not even a bus – it's a direct peer-to-peer connection to systemd, providing just that one service. (It is therefore independent of which dbus-daemon version you're running.)</div><div><br></div><div>So you need to connect to it in a slightly different way (e.g. "g_dbus_connection_new_for_address()").</div><div><br></div><div>Also keep in mind that this socket is for internal systemd use only (hence its name), and can be removed from systemd <i>at any time </i>in some future release. For your own projects it's better to set up the actual user bus.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="purple"><div><div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt"><div><div><p class="MsoNormal"><span style="color:#1f497d"><u></u><u></u></span></p></div><span class=""><div><p class="MsoNormal">(Technically the same can be done with dbus 1.8.x as well, but AFAIK the developers do not approve.)<u></u><u></u></p></div></span><div><p class="MsoNormal"><span style="color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><b><i><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">[igeiser] </span></i></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Is this the method various “user units” howtos add a dbus.socket and dbus.service into the user directory? I will research the dbus repo for their details. This is happy lab fun time so I am play with hacks if they don’t lead me away from the official solution.</span></p></div></div></div></div></div></blockquote><div><br></div><div>Yes, that would work. (Though e.g. if you use polkit it should be the very latest version as well.)</div><div><br></div><div><font size="1">[Also that's some <i>weird</i> quoting style of yours]</font></div></div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Mantas Mikulėnas <<a href="mailto:grawity@gmail.com" target="_blank">grawity@gmail.com</a>></div></div>
</div></div>