Error
Aashish Raina
aashish_raina at persistent.co.in
Sat Oct 13 05:54:13 PDT 2007
#include<stdio.h>
#include<dbus/dbus.h>
int main()
{
DBusError error;
DBusConnection *conn;
dbus_error_init (&error);
conn = dbus_bus_get (DBUS_BUS_SESSION, &error);
if (dbus_error_is_set(&error))
{
fprintf (stderr, "%s:::::::: %s\n",
error.name, error.message);
printf("succesful %p ",conn );
return 1;
}
return 1;
1: After compiling tis application and running i get the following thing
org.freedesktop.DBus.Error.Spawn.ExecFailed:::::::: Failed to execute
dbus-launch to autolaunch D-Bus session
succesful (nil)
2:This connection pointer is NULL
3:I have created a dbus-daemon and
started the session bus by executing the scricpt:
## test for an existing bus demon ,just to be safe
i f test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
eval dbus-launch --sh-syntax --exit-with-session
echo "D_BUS per-session deamon address is :
$DBUS_SESSION_BUS_ADDRESS"
fi :
4:on prompt when i do dbus-launch i get
$:dbus-launch
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-vQGYH1EStx,guid=126eb0d95457a865b7db9600470e3787
5:My session.config has
<!-- This configuration file controls the per-user-login-session
message bus.
Add a session-local.conf and edit that rather than changing
this
file directly. -->
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration
1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- Our well-known bus type, don't change this -->
<type>session</type>
<listen>unix:tmpdir=/tmp</listen>
<servicedir>/usr/share/dbus-1/services</servicedir>
<fork>
</fork>
<policy context="default">
<!-- Allow everything to be sent-->
<allow send_destination="*"/>
<!--Allow everything to be received-->
<allow eavesdrop="true"/>
<!--Allow anyone to own anything-->
<allow own="*"/>
</policy>
<!-- This is included last so local configuration can override what's
in this standard file -->
<include ignore_missing="yes">session-local.conf</include>
</busconfig>
6:Am i missing something ..
DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.
===========
“Persistent Systems Pvt. Ltd. is now PERSISTENT SYSTEMS LIMITED”
===========
More information about the dbus
mailing list