OK, I got net-wireless/bluez working under KDE 4.2.4 after a lot of reading, obtaining different pieces of the puzzle from different Web sites, and then hacking. I can now send files from my mobile phone to my laptop and vice versa. The following steps summarise the procedure, although I went through a series of iterations/failed merges before achieving success so I hope I have remembered everything and that the procedure described below reflects correctly what needs to be done.
First install bluez-4.45. To do this create the ebuild for bluez-4.45 by using the diff file from Gentoo Bugzilla Bug Report 270859 as follows. Save the diff file bluez-4.45.ebuild.diff and the patch file bluez-builds.patch from the Gentoo bug report to your Desktop. Google for the file cups-location.patch and save it to your Desktop too. Then do the following as root user, not forgetting to enter the command etc-update whenever a merge tells you a config file needs to be updated:
- Code: Select all
# emerge --sync
# layman -S
# emerge -C bluez-utils bluez-libs
# emerge -1v =bluez-4.39
# cp /usr/portage/net-wireless/bluez/bluez-4.39.ebuild /usr/portage/net-wireless/bluez/bluez-4.45.ebuild
# patch /usr/portage/net-wireless/bluez/bluez-4.45.ebuild /home/fitzcarraldo/Desktop/bluez-4.45.ebuild.diff
# cp /home/fitzcarraldo/Desktop/bluez-builds.patch /usr/portage/net-wireless/bluez/files/
# cp /home/fitzcarraldo/Desktop/cups-location.patch /usr/portage/net-wireless/bluez/files/
# cp /usr/portage/net-wireless/bluez/files/4.34-conditional_libsbc.patch /usr/portage/net-wireless/bluez/files/conditional_libsbc.patch
# cd /usr/portage/net-wireless/bluez/
# ebuild bluez-4.45.ebuild manifest
# USE="consolekit" emerge -1v =bluez-4.45
(Obviously replace "fitzcarraldo" with your username.)
Then edit the file /etc/dbus-1/system.d/bluetooth.conf and add the plugdev group as a policy:
- Code: Select all
<!-- This configuration file specifies the required security policies
for Bluetooth core daemon to work. -->
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- ../system.conf have denied everything, so we just punch some holes -->
<policy user="root">
<allow own="org.bluez"/>
<allow send_destination="org.bluez"/>
<allow send_interface="org.bluez.Agent"/>
</policy>
<policy at_console="true">
<allow send_destination="org.bluez"/>
</policy>
<policy group="plugdev">
<allow send_destination="org.bluez"/>
</policy>
<policy context="default">
<deny send_destination="org.bluez"/>
</policy>
</busconfig>
(Actually I'm not sure if the above step is necessary and/or if it's a security risk; I'll have to investigate further.)
Then, to get access to an ebuild for kdebluetooth4-0.3, add the kde-testing overlay:
- Code: Select all
# layman -a kde-testing
Then merge kdebluetooth4:
- Code: Select all
# emerge -1v kdebluetooth4
Then reboot and enter the following command under your username:
- Code: Select all
$ kbluetooth4
and the following command as the root user:
- Code: Select all
# udevadm trigger --subsystem-match=bluetooth
which causes the KBluetooth4 icon to appear in the KDE Taskbar on the Panel. Right-click on it, select Settings > Bluetooth Adapters and change the Mode to "discoverable", and then you will be able to pair with your mobile phone and send files from your mobile phone to your PC and vice versa. Files uploaded to your PC are stored in the hidden directory /home/<username>/.kbluetooth4
I hate Linux and KDE 4!

GNOME users just have to install Blueman, which apparently works out of the box.
(I did create an ebuild for bluez-4.46 too (BlueZ 4.46 was release on 18 July), which required another hack to get it to build, but I have not tested the built bluez-4.46 yet as bluez-4.45 seems to work and I want to play with it a bit first.)