Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 261942 - net-wireless/bluez: Change /etc/dbus-1/system.d/bluetooth.conf to allow users
Summary: net-wireless/bluez: Change /etc/dbus-1/system.d/bluetooth.conf to allow users
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Tiziano Müller (RETIRED)
Depends on:
Reported: 2009-03-10 04:05 UTC by Markus Strobl
Modified: 2009-03-11 00:34 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---

Corrected bluetooth.conf (bluetooth.conf,840 bytes, text/plain)
2009-03-10 04:07 UTC, Markus Strobl

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Strobl 2009-03-10 04:05:42 UTC
/etc/dbus-1/system.d/bluetooth.conf in net-wireless/bluez-4.32 only allows root to use bluetooth. This seems like a really bad idea and it also prevents kbluetooth4 from working with a totally cryptic error message.

To allow regular users from accessing bluetooth in KDE4, please add the following to /etc/dbus-1/system.d/bluetooth.conf:

  <policy group="users">
    <allow own="org.bluez"/>
    <allow send_destination="org.bluez"/>
    <allow send_interface="org.bluez.Agent"/>

Reproducible: Always

Steps to Reproduce:
1. Emerge kdebluetooth4 and any dependencies (bluez, solid etc)
2. Start kbluetooth4 as a regular user
3. Insert bluetooth dongle

Actual Results:  
No bluetooth icon in systray. Terminal shows the following (cut for brevity):

kbluetooth4(8482) BluezBluetoothManager::defaultInterface: Calling Backend Default Interface
QDBusObjectPath: invalid path ""
kbluetooth4(8482) Solid::Control::BluetoothManagerPrivate::findRegisteredBluetoothInterface: findRegisteredBluetoothInterface  ""
kbluetooth4(8482) Solid::Control::BluetoothManagerPrivate::findRegisteredBluetoothInterface: Creating New Interface  ""
kbluetooth4(8482) Solid::Control::BluetoothManagerPrivate::findRegisteredBluetoothInterface: Calling Backend to Creating New Interface  ""
process 8482: arguments to dbus_message_new_method_call() were incorrect, assertion "path != NULL" failed in file dbus-message.c line 1070.
This is normally a bug in some application using the D-Bus library.
  D-Bus not built with -rdynamic so unable to print a backtrace
KCrash: Application 'kbluetooth4' crashing...

Expected Results:  
Bluetooth icon in systray.
Comment 1 Markus Strobl 2009-03-10 04:07:47 UTC
Created attachment 184522 [details]
Corrected bluetooth.conf

Here's my bluetooth.conf that allows bluetooth to work.
Comment 2 Lars Wendler (Polynomial-C) gentoo-dev 2009-03-10 20:41:35 UTC
Reassigning to maintainer, CCing mobile and pda herds.
Comment 3 Tiziano Müller (RETIRED) gentoo-dev 2009-03-10 21:24:37 UTC
great idea! and let a user own org.bluez, so any local user can setup a fake bluetoothd to sniff your pin and therefore your data.
Sorry for the sarcasm but I spent more than two weekends figuring out how things work, convincing people that they work that way and fixing packages.

To make it short: "at_console" does what's needed. The only thing you and/or the kde-team have to make sure is that ConsoleKit is installed, setup and ready.
I now added pambase[consolekit] as RDEPEND to bluez to pull in the minimum required to have consolekit running.

Therefore: try to reinstall bluez which should now pull in pambase[consolekit] and see whether it works. If it doesn't, reopen this bug but assign it to kde this time.
In fact, kbluetooth4 needs to be fixed to not crash on the unavailability of the dbus interface. But that's another issue you should report upstream...
Comment 4 Markus Strobl 2009-03-11 00:34:01 UTC
Yep, consolekit indeed fixes it and let me revert bluetooth.conf back to its original content.