Introduction

Bluetooth is a convenience that shouldn’t be underestimated. Bluetooth has invaded pretty much every peripheral device we’ve come to know and love: mice, keyboards, ad-hoc networks, etc. One of the most convenient aspects of bluetooth is the ability to browse filesystems through a simple ad-hoc network connection from a phone or other peripheral device.

Enter Blueman

Blueman is my current preferred bluetooth management utility but others do exist including (gnome-bluetooth and kbluetooth). I have found the configurability and freedom of blueman gives me a bit more flexibility than the other solutions.

The problem with blueman under KDE is that first and foremost blueman is a gnome application. Now this isn’t inherently bad but it makes interoperability a little trickier than if I used kbluetooth (which of course hooks directly into KDE). The first issue (and pretty much only issue so far) is that blueman expects you to use nautilus to browse files on a remote device. Again, not bad but I don’t have nautilus so it’s a little tricky to see those files.

Blueman Transfer Settings

Blueman Transfer Settings

What we see in the image above is that we can modify the obex ftp browser that is used by blueman. We’re going to change this to a custom script (shown below) that uses a FUSE obexfs and dolphin to achieve our desired behavior, browsing our bluetooth file with dolphin.

#!/bin/bash
# bluemount.sh

obexfs -b $1 ~/.bluemnt
dolphin ~/.bluemnt –nofork
fusermount -u ~/.bluemnt

This script requires obexfs, fuse and of course dolphin to work properly. The script mounts the bluetooth file system to a location that we can actually browse (I arbitrarily chose ~/.bluemnt and you can choose another directory if you like). The argument we get from blueman, `$1`, is the device id that obexfs expects in order to mount our filesystem (very convenient). Once the filesystem is mounted we simply tell dolphin to open that directory but stay in the foreground so we can properly unmount the device when we finish.

Conclusion

Integrating blueman with KDE can seem daunting but a few hooks and scripts allows the two to inter-operate with ease. Now we can simply open our device list and click the browse button to get dolphin to show our files on the bluetooth device in question.

© 2011 Alunduil's Hosting Suffusion theme by Sayontan Sinha