<div dir="ltr"><div><div class="gmail_extra"><div>On Mon, Apr 22, 2013 at 2:25 AM,  <span dir="ltr">&lt;<a href="mailto:bino@indoakses-online.com" target="_blank">bino@indoakses-online.com</a>&gt;</span> wrote:<br></div><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dear All<br>
I take<br>
<a href="https://github.com/cocagne/txdbus/blob/master/doc/tutorial_examples/simple_server" target="_blank">https://github.com/cocagne/txdbus/blob/master/doc/tutorial_examples/simple_server</a><br>
and save it to /home/bino/Documents/mbink/pythons/coretac/dbus00.py<br>
<br>
It&#39;s work as expected when &#39;called&#39; using<br>
<a href="https://github.com/cocagne/txdbus/blob/master/doc/tutorial_examples/simple_client" target="_blank">https://github.com/cocagne/txdbus/blob/master/doc/tutorial_examples/simple_client</a><br>
<br>
Now I need to callable using dbus-send<br>
I wrote &#39;/usr/share/dbus-1/services/org.example.service&#39; as :<br>
<br>
[D-BUS Service]<br>
Name=org.example.MyObjPath<br>
Exec=/home/bino/Documents/mbink/pythons/coretac/dbus00.py<br></blockquote><div><br>The &quot;Name&quot; in the org.example.services file refers to the bus name(s) exported by the application. The file should instead read:<br>
<br>[D-BUS Service]<br>
Name=org.example<br>
Exec=/home/bino/Documents/mbink/pythons/coretac/dbus00.py<br> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
I try to call :<br>
dbus-send --system --print-reply \<br>
--type=method_call \<br>
--dest=&#39;org.example.MyObjPath&#39; &#39;/org/example/MyObjPath&#39; \<br>
org.example.MyObjPath.exampleMethod string:&#39;MYTEXT&#39;<br>
<br>
But I got error msg ... &lt;snip&gt;<br></blockquote><div><br>There are several problems here. The command should be:<br><br>dbus-send
 --session --print-reply --type=method_call --dest=&#39;org.example&#39; 
&#39;/MyObjPath&#39; org.example.MyIFace.exampleMethod string:&#39;MYTEXT&#39;<br><br>--session
 means you&#39;re using the session bus instead of the system bus (which 
requires a .service file in a different directory and, possibly, an 
entry in /etc/dbus-1/..). The --dest flag, similar to the Name of the 
.service file, refers to the bus name rather than the object. 
&#39;/MyObjPath&#39; is the full object path exported by the server application.
 Lastly, the fully-qualified method name is the interface name plus the 
method name rather than the object name plus method name. It&#39;s pretty easy 
to confuse the various names and paths in DBus. I did so more than once 
while writing up this reply. <br><br>Tom</div></div></div></div></div>