D-Bus setup failed: Name already in use

Solution 1:

Well, the message means that another/running daemon is using the same bus name.

  • Check using:

    $ ps aux | grep blue
    sneetsh+  2226  0.0  0.0 333592  5432 ?        Ssl  08:00   0:00 /usr/lib/x86_64-linux-gnu/indicator-bluetooth/indicator-bluetooth-service
    sneetsh+  2318  0.0  0.6 605972 48636 ?        Sl   08:00   0:00 /usr/bin/python /usr/bin/blueman-applet
    sneetsh+  2765  0.0  0.0  31484  3348 ?        S    08:00   0:00 /usr/lib/bluetooth/obexd
    root      5327  0.0  0.0  29864  4504 ?        Ss   09:03   0:00 /usr/lib/bluetooth/bluetoothd
    sneetsh+  5361  0.0  0.0   9592  2192 pts/2    S+   09:04   0:00 grep --color=auto blue
    

    Or system monitor (graphic user interface).

  • Another option, d-feet, it is DBus browser. In the bottom left corner, you can see the owner process.

    d-feet get DBUS owner PID and Command

Then sudo kill it or sudo service ... stop it if it's service. For default Ubuntu setup, it has a service, so run:

rfkill block bluetooth
sudo service bluetooth stop

Run your local daemon then enable bluetooth again

rfkill unblock bluetooth

Without switching of bluetooth, the bluetooth service will re-spawn again.