dbus error

Hi all

I have a tricky issue that i am not to sure on how to tackle

We have certain users that we a dbus session is run it does not create a ~/.dbus directory with the relevent files in it

i am not sure how to go about debugging it

thanks
Adam

How are the users running the dbus session? gives us some more detail/s please.

It is being called from a program we have created, but even if i run dbus-launch as them it does not create the files, is there a way i can test this

sorry for not giving more info i am new at this :wall:

thanks, your help is much appriacted

Can you post the permissions on ~/.dbus directory for a user for which it is not working? Maybe it is as simple as the right permissions on ~/.dbus directory.

Or you could try the following:

a) rm -rf ~/.dbus --- remove the users .dbus dir
b) mkdir -m 755 ~/.dbus as the user so that the directory gets the right permissions
c) launch dbus session and test if it works

the users that dbus is not working on there is no ~/.dbus dir
it gets created when the dbus damon scusffully starts/runs

So the dbus daemon fails to start as well? or does the daemon start successfully, but does not create a ~/.dbus dir?

The Damon starts, you can run ps -ef | grep dbus and see that it running, but the ~/.dbus does not created

So reading the man page , looks like the only reason why it won't try to create the ~/.dbus directory is if it attaches to an already existing session. So if "DBUS_SESSION_BUS_ADDRESS" is set, it will just attach itself to it, without invoking a new session, seems like a good way to prevent unnecessary calls.

If you are on redhat, try installing strace, which basically helps you trace the process. Atleast it will confirm if the below is true. Other than that, I have no more ideas on how to debug this. Maybe someone else on the forum has more experience with dbus and can pitch in.

Ok thanks for the help, $DBUS_SESSION_BUS_ADDRESS is not set

echo $DBUS_SESSION_BUS_ADDRESS
DBUS_SESSION_BUS_ADDRESS: Undefined variable

throwing it out to anyone else then

dude2cool thanks for the help

It sounds like your daemon is creating its own D-Bus message bus (channel), correct? Or is you daemon simply sending messages to the system message bus?

Are you able to see messages on this message bus using dbus-monitor?

D-Bus is a publish/subscribe mechanism. How are users subscribing to the message bus?

to be honest my knowledge is very limited, i am not 100% what it is doing

How could i use dbus-monitor with the application to see what it is doing?>>

thanks