Difference between revisions of "Blueman"

From ArchWiki
Jump to: navigation, search
m (Style fixes, broken link removed.)
m (Workaround for a Bug with obex and gvfs)
(48 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
[[Category:Bluetooth]]
 
[[Category:Bluetooth]]
This is a collection of tips and information regarding '''blueman''', a GTK+ bluetooth manager.
+
[https://launchpad.net/blueman Blueman] is a full featured Bluetooth manager written in [[GTK+]].
 +
{{Related articles start}}
 +
{{Related|Bluez4}}
 +
{{Related|Bluetooth}}
 +
{{Related articles end}}
  
 
== Installation ==
 
== Installation ==
 +
{{warning|Blueman currently relies on the, now unmaintained, [[Bluez4]] stack. A version of Blueman that is compatible with Bluez5 is in development. [https://github.com/blueman-project/blueman/tree/bluez5]}}
  
[[pacman|Install]] {{Pkg|blueman}} from the [[official repositories]].
+
Blueman can be installed from the {{AUR|blueman-bzr}} package in the [[AUR]].
  
Be sure to enable the bluetooth daemon and start blueman with blueman-applet.
+
Be sure to enable the [[Bluetooth]] daemon and start Blueman with {{ic|blueman-applet}}.
  
== Blueman and PulseAudio ==
+
{{Tip|If you want to mount and browse remote devices, you may need to install the {{AUR|gvfs-obexftp-bluez4}} package from the [[AUR]].}}
  
Users who want to use PulseAudio with a bluetooth headset may want to activate the pulseaudio plugin of Blueman. This automatically loads pulseaudio bluetooth module after audio device is connected and plays all audio through the bluetooth headset.
+
== Usage ==
  
== Troubleshooting ==
+
=== Checking the Bluetooth hardware ===
  
=== Blueman and Thunar ===
+
Be sure the local Bluetooth device is availabe by running {{ic|hcitool dev}}. If only {{ic|Devices:}} is dumped, the local Bluetooth device is unavailable. If this is the case, try restarting the ''bluetooth'' service or toggle the WiFi/Bluetooth switch on your laptop (if it exists). For example: the switch is {{ic|Fn+F3}} on an Acer Aspire laptop. Also try rebooting to activate the local Bluetooth device. If you run {{ic|blueman-applet}} without an available local Bluetooth device, the Blueman tray icon will not appear.
  
As long as you  have gvfs-obexftp installed, you can use thunar from blueman to browse files remotely. Open up the blueman services configuration window and replace
+
=== Autostarting ===
nautilus --browse obex://
+
with
+
thunar obex://
+
  
=== Workaround for a Bug with obex and gvfs ===
+
The following autostart file should have been created: {{ic|/etc/xdg/autostart/blueman.desktop}}. This means that Blueman should be autostarted with most desktop environments without manual intervention. See the article for your desktop environment or window manager as well as the [[Autostarting]] article for further information on autostarting.
  
{{Note|This bug only afflict older versions of blueman.}}
+
=== Permissions ===
To browse mobile phone via nautilus with blueman you need a patched gvfs. Install gvfs-rar from AUR: https://aur.archlinux.org/packages.php?ID=23861
+
  
obex-data-server package is broken for now and needs to rebuild with:
+
It might be necessary for the user to be added to the {{ic|lp}} group in order for the user to be able to add and manage Bluetooth devices using Blueman. See {{ic|/etc/dbus-1/system.d/bluetooth.conf}} for the section that enables users of the {{ic|lp}} group to communicate with the Bluetooth daemon.
$ ./configure --prefix=/usr --sysconfdir=/etc
+
Just grab it from [[ABS]] and rebuild.
+
  
>>For me now with actual obex-data-server and standard gvfs all is working fine (Yes obex-browsing too) the only thing is delete files on remote storage do not work.
+
To receive files remember to right click on the ''Blueman tray icon > Local Services > Transfer > File Receiving" and tick the square box next to "Enabled".
  
=== Workaround a bug with network manager in bluetooth networking ===
+
{{Note|If you are running Blueman in a session that is started with the ''startx'' command, you should add {{ic|source /etc/X11/xinit/xinitrc.d/*}} to your {{ic|~/.xinitrc}} to make Nautilus capable of browsing your devices.}}
  
Some distributions show all bluetooth interfaces as net.80203, which can cause strange behaviour in network manager,
+
=== Mounting Bluetooth devices without Nautilus ===
for example NM trying to get dhcp address for an incoming connection.
+
  
{{Note|This bug only afflicts versions below 1.02.}}
+
Blueman is configured to use [[Nautilus]] for bluetooth device mounting by default. The instructions below describe a method for using different file managers with Blueman. The examples in this section focus on [[Thunar]]. If you are using a different file manager, substitute ''thunar'' with the name of the file manager you are using.
  
Put this in {{ic|/etc/hal/fdi/information/bnep.fdi}}:
+
{{hc|obex_thunar.sh|
 +
#!/bin/bash
 +
fusermount -u ~/bluetooth
 +
obexfs -b $1 ~/bluetooth
 +
thunar ~/bluetooth
 +
}}
  
{{bc|<nowiki>
+
Now you will need to move the script to an appropriate location (e.g., {{ic|/usr/local/bin}}). After that, mark it as executable:
<?xml version="1.0" encoding="UTF-8"?>
+
# chmod +x /usr/local/bin/obex_thunar.sh
  
<deviceinfo version="0.2">
+
The last step is to change the line in ''Blueman tray icon > Local Services > Transfer > Advanced'' to {{ic|obex_thunar.sh %d}}.
<device>
+
  <match key="info.category" string="net.80203">
+
    <match key="net.interface" contains="bnep">
+
        <merge key="info.category" type="string">net.bluetooth</merge>
+
        <merge key="info.product" type="string">Bluetooth Interface</merge>
+
        <merge key="info.capabilities" type="strlist">net, net.bluetooth</merge>
+
        <merge key="net.bluetooth.mac_address" type="copy_property">net.80203.mac_address</merge>
+
        <remove key="net.80203.mac_address"/>
+
    </match>
+
  </match>
+
</device>
+
</deviceinfo>
+
</nowiki>}}
+
  
=== Can't receive files ===
+
{{Tip|If you do not want to create a script, you could just replace this command: {{ic|nautilus --browse obex://}} with this one: {{ic|thunar obex://}} in ''Local Services > Transfer > Advanced''}}
  
You have to edit {{ic|/etc/conf.d/bluetooth}} file and uncomment this line:
+
=== Blueman and PulseAudio ===
 +
 
 +
Users who want to use [[PulseAudio]] with a Bluetooth headset may want to activate the PulseAudio plugin of Blueman. This automatically loads PulseAudio Bluetooth module after audio device is connected and plays all audio through the Bluetooth headset.
 +
 
 +
== Troubleshooting ==
 +
 
 +
=== Workaround for a Bug with obex and gvfs ===
 +
 
 +
{{Note|This bug only affects older versions of Blueman.}}
 +
To browse a mobile phone using [[Nautilus]] and Blueman you will need a patched version of [[GVFS]]. Install {{AUR|gvfs-rar}} from [[AUR]]. It is possible that you will need to rebuild the {{AUR|obex-data-server}} package as shown below:
 +
$ ./configure --prefix=/usr --sysconfdir=/etc
 +
 
 +
=== Cannot receive files ===
 +
 
 +
If you cannot receive files with Blueman, edit the {{ic|/etc/conf.d/bluetooth}} file and uncomment this line:
  
 
  #SDPD_ENABLE="true"
 
  #SDPD_ENABLE="true"
 +
 +
=== Blueman applet does not start ===
 +
 +
If blueman-applet fails to start, try removing the entire {{ic|/var/lib/bluetooth}} directory and restarting the machine (or just the dbus and bluetooth services).
 +
# rm -rf /var/lib/bluetooth
 +
$ systemctl reboot
 +
If you see a notification saying {{ic|Incoming file over Bluetooth}} then this means that the device isn't marked as trusted. Mark it as trusted and try sending the file again.
  
 
== See also ==
 
== See also ==
  
https://bbs.archlinux.org/viewtopic.php?id=65889 - Discussion threads on problems
+
* [https://launchpad.net/blueman Blueman development], on Launchpad
 +
* [https://github.com/blueman-project/blueman Blueman development], on GitHub

Revision as of 20:46, 22 March 2014

Blueman is a full featured Bluetooth manager written in GTK+.

Related articles

Installation

Warning: Blueman currently relies on the, now unmaintained, Bluez4 stack. A version of Blueman that is compatible with Bluez5 is in development. [1]

Blueman can be installed from the blueman-bzrAUR package in the AUR.

Be sure to enable the Bluetooth daemon and start Blueman with blueman-applet.

Tip: If you want to mount and browse remote devices, you may need to install the gvfs-obexftp-bluez4AUR package from the AUR.

Usage

Checking the Bluetooth hardware

Be sure the local Bluetooth device is availabe by running hcitool dev. If only Devices: is dumped, the local Bluetooth device is unavailable. If this is the case, try restarting the bluetooth service or toggle the WiFi/Bluetooth switch on your laptop (if it exists). For example: the switch is Fn+F3 on an Acer Aspire laptop. Also try rebooting to activate the local Bluetooth device. If you run blueman-applet without an available local Bluetooth device, the Blueman tray icon will not appear.

Autostarting

The following autostart file should have been created: /etc/xdg/autostart/blueman.desktop. This means that Blueman should be autostarted with most desktop environments without manual intervention. See the article for your desktop environment or window manager as well as the Autostarting article for further information on autostarting.

Permissions

It might be necessary for the user to be added to the lp group in order for the user to be able to add and manage Bluetooth devices using Blueman. See /etc/dbus-1/system.d/bluetooth.conf for the section that enables users of the lp group to communicate with the Bluetooth daemon.

To receive files remember to right click on the Blueman tray icon > Local Services > Transfer > File Receiving" and tick the square box next to "Enabled".

Note: If you are running Blueman in a session that is started with the startx command, you should add source /etc/X11/xinit/xinitrc.d/* to your ~/.xinitrc to make Nautilus capable of browsing your devices.

Mounting Bluetooth devices without Nautilus

Blueman is configured to use Nautilus for bluetooth device mounting by default. The instructions below describe a method for using different file managers with Blueman. The examples in this section focus on Thunar. If you are using a different file manager, substitute thunar with the name of the file manager you are using.

obex_thunar.sh
#!/bin/bash
fusermount -u ~/bluetooth
obexfs -b $1 ~/bluetooth
thunar ~/bluetooth

Now you will need to move the script to an appropriate location (e.g., /usr/local/bin). After that, mark it as executable:

# chmod +x /usr/local/bin/obex_thunar.sh

The last step is to change the line in Blueman tray icon > Local Services > Transfer > Advanced to obex_thunar.sh %d.

Tip: If you do not want to create a script, you could just replace this command: nautilus --browse obex:// with this one: thunar obex:// in Local Services > Transfer > Advanced

Blueman and PulseAudio

Users who want to use PulseAudio with a Bluetooth headset may want to activate the PulseAudio plugin of Blueman. This automatically loads PulseAudio Bluetooth module after audio device is connected and plays all audio through the Bluetooth headset.

Troubleshooting

Workaround for a Bug with obex and gvfs

Note: This bug only affects older versions of Blueman.

To browse a mobile phone using Nautilus and Blueman you will need a patched version of GVFS. Install gvfs-rarAUR from AUR. It is possible that you will need to rebuild the obex-data-serverAUR package as shown below:

$ ./configure --prefix=/usr --sysconfdir=/etc

Cannot receive files

If you cannot receive files with Blueman, edit the /etc/conf.d/bluetooth file and uncomment this line:

#SDPD_ENABLE="true"

Blueman applet does not start

If blueman-applet fails to start, try removing the entire /var/lib/bluetooth directory and restarting the machine (or just the dbus and bluetooth services).

# rm -rf /var/lib/bluetooth
$ systemctl reboot

If you see a notification saying Incoming file over Bluetooth then this means that the device isn't marked as trusted. Mark it as trusted and try sending the file again.

See also