I should have been more clear. Forgive the large text dump here, but I'm not certain how to better explain what I'm seeing. Below is the output of dbus-monitor, the first clip from a successful run, the second from a failed run. In one terminal I launch dbus-monitor and in another I execute 'python 
tbird.py&#39;.<br><br>You&#39;ll notice (where I&#39;ve marked with &#39;*****&#39;) that in the failed run, the NewMail signal comes before GetNameOwner (which I meant in my first post as the point were things are fully registered), but that in the successful run, GetNameOwner comes before the call to NewMail.
<br><br>For full disclosure, I have another script that listens for NameOwnerChanged and when it finds the org.mozilla.thunderbird.DBus change, connects a callback function to the NewMail signal - so by successful run, I mean the callback function gets fired. It&#39;s certainly possible that my problem is on that side, but it does seem strange that I&#39;m seeing the NewMail signal before the GetNameOwner method call in the bad run.
<br><br>I noticed that when running the command you used, I see no GetNameOwner call - is this a sign that the problem is on the other end (is GetNameOwner a result of connecting the callback function)?<br><br>Thanks for your help,
<br>Jim<br><br>dbus-monitor output below:<br><br>--------------------------------------------------------<br>Successful Run:<br>--------------------------------------------------------<br>
signal sender=org.freedesktop.DBus -&gt; dest=(null destination) path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
<br>&nbsp;&nbsp; string &quot;:1.40&quot;
<br>&nbsp;&nbsp; string &quot;&quot;
<br>&nbsp;&nbsp; string &quot;:1.40&quot;<br>&nbsp;<br>method call sender=:1.40 -&gt; dest=org.freedesktop.DBus path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=Hello
<br><br>signal sender=org.freedesktop.DBus -&gt; dest=(null destination) path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
<br>&nbsp;&nbsp; string &quot;org.mozilla.thunderbird.DBus&quot;
<br>&nbsp;&nbsp; string &quot;&quot;
<br>&nbsp;&nbsp; string &quot;:1.40&quot;
<br><br>method call sender=:1.40 -&gt; dest=org.freedesktop.DBus path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=RequestName
<br>&nbsp;&nbsp; string &quot;org.mozilla.thunderbird.DBus&quot;
<br>&nbsp;&nbsp; uint32 0
<br><br>method call sender=:1.33 -&gt; dest=org.freedesktop.DBus path=/org/freedesktop/DBus; interface=org.freedesktop.DBus.Introspectable; member=Introspect
<br><br>*******<br>method call sender=:1.33 -&gt; dest=org.freedesktop.DBus path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=GetNameOwner
<br>&nbsp;&nbsp; string &quot;org.mozilla.thunderbird.DBus&quot;
<br><br>method call sender=:1.33 -&gt; dest=:1.40 path=/org/mozilla/thunderbird/DBus/NewMail; interface=org.freedesktop.DBus.Introspectable; member=Introspect
<br><br>method call sender=:1.33 -&gt; dest=org.freedesktop.DBus path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
<br>&nbsp;&nbsp; string &quot;type=&#39;signal&#39;,sender=&#39;:1.40&#39;,path=&#39;/org/mozilla/thunderbird/DBus/NewMail&#39;,interface=&#39;org.mozilla.thunderbird.DBus&#39;,member=&#39;NewMail&#39;&quot;
<br><br>signal sender=:1.40 -&gt; dest=(null destination) path=/org/mozilla/thunderbird/DBus/NewMail; interface=org.mozilla.thunderbird.DBus; member=NewMail
<br>&nbsp;&nbsp; string &quot;test&quot;
<br>&nbsp;&nbsp; string &quot;test&quot;
<br><br>signal sender=org.freedesktop.DBus -&gt; dest=(null destination) path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
<br>&nbsp;&nbsp; string &quot;org.mozilla.thunderbird.DBus&quot;
<br>&nbsp;&nbsp; string &quot;:1.40&quot;
<br>&nbsp;&nbsp; string &quot;&quot;
<br><br>signal sender=org.freedesktop.DBus -&gt; dest=(null destination) path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
<br>&nbsp;&nbsp; string &quot;:1.40&quot;
<br>&nbsp;&nbsp; string &quot;:1.40&quot;
<br>&nbsp;&nbsp; string &quot;&quot;<br><br>--------------------------------------------------------<br>
Bad Run:<br>
--------------------------------------------------------<br>signal sender=org.freedesktop.DBus -&gt; dest=(null destination) path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
<br>&nbsp;&nbsp; string &quot;:1.35&quot;
<br>&nbsp;&nbsp; string &quot;&quot;
<br>&nbsp;&nbsp; string &quot;:1.35&quot;<br>&nbsp;<br>method call sender=:1.35 -&gt; dest=org.freedesktop.DBus path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=Hello<br>&nbsp;<br>signal sender=org.freedesktop.DBus -&gt; dest=(null destination) path=/org/freedesktop/DBus; interface=
org.freedesktop.DBus; member=NameOwnerChanged
<br>&nbsp;&nbsp; string &quot;org.mozilla.thunderbird.DBus&quot;
<br>&nbsp;&nbsp; string &quot;&quot;
<br>&nbsp;&nbsp; string &quot;:1.35&quot;<br>&nbsp;<br>method call sender=:1.35 -&gt; dest=org.freedesktop.DBus path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=RequestName
<br>&nbsp;&nbsp; string &quot;org.mozilla.thunderbird.DBus&quot;
<br>&nbsp;&nbsp; uint32 0<br>&nbsp;<br>method call sender=:1.33 -&gt; dest=org.freedesktop.DBus path=/org/freedesktop/DBus; interface=org.freedesktop.DBus.Introspectable; member=Introspect
<br><br>*******<br>signal sender=:1.35 -&gt; dest=(null destination) path=/org/mozilla/thunderbird/DBus/NewMail; interface=org.mozilla.thunderbird.DBus; member=NewMail
<br>&nbsp;&nbsp; string &quot;test&quot;
<br>&nbsp;&nbsp; string &quot;test&quot;
<br><br>method call sender=:1.33 -&gt; dest=org.freedesktop.DBus path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=GetNameOwner
<br>&nbsp;&nbsp; string &quot;org.mozilla.thunderbird.DBus&quot;
<br><br>method call sender=:1.33 -&gt; dest=:1.35 path=/org/mozilla/thunderbird/DBus/NewMail; interface=org.freedesktop.DBus.Introspectable; member=Introspect
<br><br>method call sender=:1.33 -&gt; dest=org.freedesktop.DBus path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
<br>&nbsp;&nbsp; string &quot;type=&#39;signal&#39;,sender=&#39;:1.35&#39;,path=&#39;/org/mozilla/thunderbird/DBus/<br>NewMail&#39;,interface=&#39;org.mozilla.thunderbird.DBus&#39;,member=&#39;NewMail&#39;&quot;
<br><br>signal sender=org.freedesktop.DBus -&gt; dest=(null destination) path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
<br>&nbsp;&nbsp; string &quot;org.mozilla.thunderbird.DBus&quot;
<br>&nbsp;&nbsp; string &quot;:1.35&quot;
<br>&nbsp;&nbsp; string &quot;&quot;
<br><br>signal sender=org.freedesktop.DBus -&gt; dest=(null destination) path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
<br>&nbsp;&nbsp; string &quot;:1.35&quot;
<br>&nbsp;&nbsp; string &quot;:1.35&quot;
<br>&nbsp;&nbsp; string &quot;&quot; <br><br><br><div><span class="gmail_quote">On 8/1/07, <b class="gmail_sendername">Simon McVittie</b> &lt;<a href="mailto:simon.mcvittie@collabora.co.uk">simon.mcvittie@collabora.co.uk</a>&gt; wrote:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">On Wed, 01 Aug 2007 at 09:41:09 -0400, Jim Kytola wrote:<br>&gt; Using the below code (without the sleep call) I would almost always see the
<br>&gt; call to my emitter function before the object was fully registered on the<br>&gt; dbus. If I add the sleep call, it works, however, the sleep (like I would<br>&gt; expect) causes Thunderbird to hang for that time. Am I missing something
<br>&gt; here - does anyone have any suggestions for a better way to do what I&#39;m<br>&gt; trying to do?<br><br>What do you mean by &quot;fully registered&quot;?<br><br>Test case: if I remove the time.sleep() call from your code and run:
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;dbus-launch sh -c &#39;dbus-monitor &amp; sleep 1; python tbird.py; sleep 1&#39;<br><br>I see events in this order:<br><br>signal NameOwnerChanged, name=:1.1, old=&quot;&quot;, new=:1.1 (tbird.py joins bus)<br>
signal NameOwnerChanged, name=org.mozilla.thunderbird.DBus, old=&quot;&quot;, new=:1.1<br>&nbsp;&nbsp;&nbsp;&nbsp;(tbird.py is given its desired bus name)<br>signal NewMail (tbird.py emits its signal)<br>signal NameOwnerChanged, name=org.mozilla.thunderbird.DBus
, old=:1.1, new=&quot;&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;(tbird.py releases its bus name during shutdown)<br>signal NameOwnerChanged, name=:1.1, old=:1.1, new=&quot;&quot; (tbird.py leaves bus)<br><br>This looks to me like the desired behaviour. What&#39;s the problem?
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Simon<br>_______________________________________________<br>dbus mailing list<br><a href="mailto:dbus@lists.freedesktop.org">dbus@lists.freedesktop.org</a><br><a href="http://lists.freedesktop.org/mailman/listinfo/dbus">
http://lists.freedesktop.org/mailman/listinfo/dbus</a><br></blockquote></div><br>