<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div><span>Thanks Lennart. Is there a way I can do it from shell rather than writing C or Java code? I just want to quickly verify that the messages I get once Unit state changes. Any example? </span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><span><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><span>Thanks.</span></div><div class="yahoo_quoted" style="display: block;"> <br> <br> <div style="font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande',
sans-serif; font-size: 12pt;"> <div style="font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12pt;"> <div dir="ltr"> <font size="2" face="Arial"> On Wednesday, March 5, 2014 2:22 PM, Lennart Poettering <lennart@poettering.net> wrote:<br> </font> </div> <div class="y_msg_container">On Wed, 05.03.14 08:42, Usman (<a shape="rect" ymailto="mailto:desert03@yahoo.com" href="mailto:desert03@yahoo.com">desert03@yahoo.com</a>) wrote:<div class="yqt1327808607" id="yqtfd21695"><br clear="none"><br clear="none">> Hi Guys,<br clear="none">> <br clear="none">> Probably this question has been asked before and it might be a DBus<br clear="none">> list question rather than systemd but just asking anyway, so please<br clear="none">> pardon my ignorance. I am using "dbus-send" to get some properties out<br clear="none">> of systemd dbus messages when an application dies. The thing is that I<br
clear="none">> need to send Subscribe first to systemd so that I can receive those<br clear="none">> messages. But if I use dbus-send from commandline it immediately exits<br clear="none">> and then there is no where to receive the death notification messages<br clear="none">> (since there are no active subscriptions). How are you guys testing<br clear="none">> this? Write any script that stays? Any example I can follow? </div><br clear="none"><br clear="none">Subscribe() is for receiving signals about property changes and<br clear="none">new/removed jobs/units. It is not necessary to call this if you just<br clear="none">want to invoke a method call and want the response for that.<br clear="none"><br clear="none">"dbus-send" cannot listen for signals, it only does method invocations,<br clear="none">hence Subscribe() does not apply to it at all...<br clear="none"><br clear="none">Lennart<br clear="none"><br clear="none">-- <br
clear="none">Lennart Poettering, Red Hat<div class="yqt1327808607" id="yqtfd94878"><br clear="none"></div><br><br></div> </div> </div> </div> </div></body></html>