<br><br>hi ppl<br>&nbsp;&nbsp;&nbsp; i am trying to writea simple client application to connect to a dbus server..<br>the code is as below..<br>#include &lt;stdio.h&gt;<br>#include &lt;dbus/dbus-glib.h&gt;<br>#include &lt;stdlib.h&gt;<br>
#define DBUS_SERVICE <br><br><br><br>int <br>main()<br>{<br>&nbsp;&nbsp;&nbsp; DBusGConnection *connection;<br>&nbsp;&nbsp;&nbsp; DBusGProxy *remote_object;<br>&nbsp;&nbsp;&nbsp; GMainLoop *mainloop;<br>&nbsp;&nbsp;&nbsp; gchar *path;<br>&nbsp;&nbsp;&nbsp; char *nameList1,*nameList2,*nameList3,*nameList4;
<br>&nbsp;&nbsp;&nbsp; GError *error = NULL;<br><br>&nbsp;&nbsp;&nbsp; g_type_init();<br>&nbsp;&nbsp;&nbsp; connection= dbus_g_bus_get (DBUS_BUS_SESSION, &amp;error);<br>&nbsp;&nbsp;&nbsp; if (connection == NULL) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; printf(&quot;\nCould not connect..&quot;);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return 1;
<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; remote_object =dbus_g_proxy_new_for_name(connection,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &quot;org.freedesktop.Notifications&quot;,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &quot;/org/freedesktop/Notifications&quot;,&quot;org.freedesktop.Notifications
&quot;);<br><br>&nbsp;&nbsp;&nbsp; printf(&quot;\nGot proxy..&quot;);&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; error = NULL;<br>&nbsp;&nbsp;&nbsp; if(!dbus_g_proxy_call(remote_object,&quot;GetServerInformation&quot;,&amp;error,G_TYPE_STRING,&amp;nameList1,G_TYPE_STRING,&amp;nameList2,G_TYPE_STRING,&amp;nameList3,G_TYPE_STRING,&amp;nameList4,G_TYPE_INVALID,G_TYPE_INVALID)){
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; printf (&quot;\nerror..%s\n&quot;,error-&gt;message);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; return 1;<br>&nbsp;&nbsp;&nbsp; }<br><br>}<br>&nbsp;&nbsp;&nbsp; <br><br>when i run the program, i get an error..<br>arvind@ARVIND:~/mydev$ ./dbus-test mydev$ ./dbus-test<br>
<br>Got proxy..<br>error..No reply within specified time<br><br><br>how do i correct it?<br><br><br clear="all"><br>-- <br>Regards<br>&nbsp;&nbsp;ARviND AyyangaR<br><br> &quot;Success is not measured by what a man accomplishes, but by the opposition he has encountered, and the courage with which he maintained the struggle against overwhelming odds.&quot;