[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Unable to connect to dbus socket.



Le dimanche 19 octobre 2008 à 13:45 +0200, Guido Loupias a écrit :
> This is a slightly modified version of the code that is in libnotify_init() 
> which I put in my own program to redirect the output (error->message) to a 
> logfile because I wasn't sure how to redirect g_message() (which is what the 
> code in libnotify_init() uses to output the error). The logfile looks like this:
> 
> ERROR: Failed to connect to socket /tmp/dbus-fgcckjDDZP: Verbinding is geweigerd
> LOG: LibNotify constructor called (this = 0x9bb1c14)

> The LOG messages come from another line of code. It's the ERROR message that is 
> coming from std::runtime_error(error->message). "Verbinding is geweigerd" is 
> Dutch for "Connection refused". The log file is an accumulation of multiple runs 
> of the program, it's not erased when the program is restarted. So for every 
> ERROR in the log file there is 1 run of the program (one logout and login).

It looks like libdbus tries to use the socket that is related to your
previous session, which is of course wrong since dbus-daemon has exited
and will not accept new connections on it.

You should look at the DBUS_SESSION_BUS_ADDRESS, and see what is setting
it to the previous value. If you are running a panel applet, the
probable cause is that the bonobo-activation-server process from the
previous session is still running and is setting this environment
variable.

Newer versions of b-a-s are based on dbus so this will not happen in
GNOME 2.26. As for the current version, you need to add the following to
your .server file (under the oaf_server with type="exe"):
                <oaf_attribute name="bonobo:environment" type="stringv">
                        <item value="DBUS_SESSION_BUS_ADDRESS"/>
                </oaf_attribute>

Cheers,
-- 
 .''`.
: :' :      We are debian.org. Lower your prices, surrender your code.
`. `'       We will add your hardware and software distinctiveness to
  `-        our own. Resistance is futile.

Attachment: signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=


Reply to: