Finally, about a decade after the rest of the gadget owning world, I find I now want to use Bluetooth as I've recently acquired a nice used phone with Bluetooth, camera, www, java apps etc. to replace my basic monochrome green screen calls+sms only model...and it was free, thanks sis! Shame about the lurid colour...... anyway I'm using Xfce with Thunar and I quickly realised that while sending via Bluetooth is already integrated into the context menu there is no browsing. I could easily browse Bluetooth shares from my Nokia N810 and my crappy cheapo Android tablet but I couldn't do it from my PC via Blueman or via the file manager. A little searching showed me that obexfs is in the repos
I tried it and wasn't too keen. I want it easy and foolproof, and to never need to to care what channel is used, what the full bluetooth device name might be, which usb device is which and so on. Then I found a neat script in the Blueman forums. You change one option in Blueman and now when choosing to browse a Bluetooth device instead of calling Nautilus it calls the script which creates a directory and uses fuse to mount the remote bluetooth device's file system on that directory. Choose browse again and it unmounts and removes the directory. As well as Bluetooth and Blueman installed and working you need fuse, fuse-utils and obexfs. You must be a member of the group fuse.ObexFS uses FUSE to mount filesystems of ObexFTP capable
devices either manually or in autofs style mode.
Here's the script:
Code: Select all
#!/bin/bash
log=/var/log/blueman-browse-helper.log
mp=~/.obex-"$1"
channel=`sdptool search --bdaddr "$1" FTP | awk '/Channel:/ {print $2}'`
if [ -e "$mp" ]; then
echo "`date`: cleaning up mount point '$mp'" >> $log
fusermount -u -z "$mp" &>> $log
rmdir "$mp" &>> $log
else
echo "`date`: opening FTP channel '$channel' for mount point '$mp'" >> $log
mkdir "$mp" &>> $log
obexfs -b "$1" -B $channel "$mp" &>> $log
dolphin "$mp" &>> $log
fi
echo "`date`: `basename $0` finished for mount point '$mp'" >> $log
Code: Select all
blueman-browse-helper %d