# DBus running but not working



## mrmarbury (Apr 21, 2013)

Hi,

I don*'*t know if this is the right area but I'm experiencing this in X sessions. So I post it here. I'm currently (or better still) about to switch over to FreeBSD. So I started an installation of 9.1 a month ago and wanted to finish it this weekend. The biggest problems I seem to have for now is with D-Bus. I have it enabled in rc.conf and after boot I have those processes running:

```
1296 ??  Is     0:01.30 /usr/local/bin/dbus-daemon --system
1734 ??  I      0:00.00 dbus-launch --sh-syntax --exit-with-session --autolaunch 0d2b140a00d096a354fd4d5e00000ae0
1735 ??  Ss     0:02.11 /usr/local/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
3131 ??  Is     0:00.00 /usr/local/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
3154 ??  Is     0:00.00 /usr/local/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
```

`qdbus` (as user) gives me this:

```
:1.0
org.freedesktop.DBus
```

And `echo $DBUS_SESSION_BUS_ADDRESS` (as user) tells me:

```
unix:path=/tmp/dbus-wmCWWGcZo4,guid=b7ab4ffb74229aec8a5b5b315173e885
```

But I have the following problems:

When trying to start a window manager via slim I get 

```
slim: waiting for X server to begin accepting connections.
slim: waiting for X server to shut down
```

And when I try to add a VM to VirtualBox I get the following error:

```
Could not start process Cannot talk to klauncher: Not connected to D-Bus server.
```

I searched like the whole Internet (or what Google showed me) but didn't find anything valuable that helps me. I did a complete system upgrade which upgraded D-Bus to 1.6.8. But that didn't help either. I deleted the .dbus directory and even .kde4 (to make sure there is nothing stale KDE-wise)

Does any of you have an idea what I need to do to make this work as expected?

Cheers,
Stefan


----------



## SirDice (Apr 23, 2013)

Slim doesn't start the D-Bus session as does KDM or GDM. Using this in .xinitrc might work:

```
exec ck-launch-session dbus-launch --exit-with-session /usr/local/kde4/bin/startkde
```


----------



## mrmarbury (Apr 27, 2013)

Hi,

thx Thanks for the tip, but unfortunately it doesn't work. When I start KDE with for example KDM I have a dbus session (see logs in my initial post) but it seems that either KDE is not interested in it or dbus is not responding to requests. 

I also tried with a completely empty home directory to rule out misconfiguration. Doesn't help either. Searching the internet brought up many sites where this problem under Linux was a D-Bus Bug. But I seem to be the only one having it on F*ree*BSD? At least I'm the only one writing about such problems.

I'm also pretty sure it is not a KDE bug. Tried with AwesomeWM and the problem was the same.

Dang,
Stefan


----------



## mrmarbury (Apr 30, 2013)

Fiddled around a bit but nothing helped. I will rebuild all packages tonight. Maybe that will help.

Cheers,
Stefan


----------



## mrmarbury (Apr 30, 2013)

*[SOLVED] DBus running but not working*

Well. I think this is partially solved. Recompiling didn't work but after I downgraded to dbus 1.4.14 now everything works as expected again. So it was version 1.6.8 messing up my system. Especially VirtualBox's file dialog ^^

Now I need to find a way to prevent devel/dbus from getting upgraded automagically. But I will Google that.

Cheers,
Stefan


----------



## Handy92 (Feb 21, 2016)

I had the same bug using KDE4 and VirtualMachine. I solved it, is no elegant solution but working...


```
1. Disable KDM from rc.conf
2. Start PC without X Window System.
3. Start X Windows System with only VirtualBox [CMD]%startx /usr/local/bin/VirtualBox/[/CMD]
4. Install system.
5. Enable again KDM.
```


----------

