Difference between revisions of "Blueman"

From ArchWiki
Jump to: navigation, search
(update link to project)
m (removed a word.)
 
(81 intermediate revisions by 16 users not shown)
Line 1: Line 1:
 
[[Category:Bluetooth]]
 
[[Category:Bluetooth]]
[https://launchpad.net/blueman Blueman] is a full featured Bluetooth manager written in [[GTK+]] and, as such, is recommended for [[GNOME]], [[Xfce]], or [[LXDE]].
+
[[ja:Blueman]]
 +
{{Related articles start}}
 +
{{Related|Bluetooth}}
 +
{{Related|Bluez4}}
 +
{{Related articles end}}
 +
[https://github.com/blueman-project/blueman Blueman] is a full featured Bluetooth manager written in [[GTK+]]. See the project page on [https://github.com/blueman-project/blueman Github].
  
 
== Installation ==
 
== Installation ==
  
[[pacman|Install]] {{Pkg|blueman}} from the [[official repositories]].
+
Install either {{Pkg|blueman}} or {{AUR|blueman-git}} (the development version).
  
Be sure to enable the [[Bluetooth]] daemon and start Blueman with {{ic|blueman-applet}}.
+
Be sure to enable the [[Bluetooth]] daemon and start Blueman with {{ic|blueman-applet}}. A graphical settings panel can be launched with {{ic|blueman-manager}}.
  
 
== Usage ==
 
== Usage ==
  
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. You may restart the ''bluetooth'' service or toggle the WiFi/Bluetooth switch of your laptop, for example {{ic|Fn+F3}} in Acer Aspire or reboot to activate the local Bluetooth device. If you run {{ic|blueman-applet}} without available local Bluetooth device, the Blueman tray icon will not appear.
+
=== Autostarting ===
  
Then execute {{ic|blueman-applet}}, and the Blueman tray icon will show up. {{ic|/etc/xdg/autostart/blueman.desktop}} may have been created to autostart Blueman when loggin into X in a system-wide manner. If not, to make the applet run after login into a graphical environment automatically, add {{ic|blueman-applet}} either under ''System > Preferences > Startup Applications'' (GNOME) or ''Xfce Menu > Settings > Session and Startup'' (Xfce). Various ways to autostart a program are listed in [[Autostarting]].
+
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.
  
In order for a user to add and manage Bluetooth devices using Blueman, the user must be added to the {{ic|lp}} group. 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.
+
=== Permissions ===
  
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".
+
To receive files remember to right click on the ''Blueman tray icon > Local Services > Transfer > File Receiving (Object Push)'' and tick the ''Accept files from trusted devices'' box.
  
{{Note|If you are running Blueman outside GNOME/GDM (e.g., in Xfce using the {{ic|startx}} command) you should add {{ic|source /etc/X11/xinit/xinitrc.d/*}} on top of your {{ic|~/.xinitrc}} to make Nautilus capable to browse your devices.}}
+
To be able to manage devices, you might need to add your user to the {{ic|lp}} group, else you might receive the following error when connecting to a device: {{ic|DBusFailedError: No such file or directory}}. This is because the user needs to be authorized to communicate with the bluetooth daemon via [[D-Bus]] - the {{ic|lp}} group is specified in {{ic|/etc/dbus-1/system.d/bluetooth.conf}}. For information on adding a user to a group, see [[Users and groups#Other examples of user management]].
  
==== Generic file manager script ====
+
=== Mounting Bluetooth devices ===
 +
 
 +
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.
  
If you are not using Nautilus (for example Thunar) you may find the following script useful:
 
 
{{hc|obex_thunar.sh|
 
{{hc|obex_thunar.sh|
 
#!/bin/bash
 
#!/bin/bash
Line 29: Line 35:
 
thunar ~/bluetooth
 
thunar ~/bluetooth
 
}}
 
}}
 +
 
Now you will need to move the script to an appropriate location (e.g., {{ic|/usr/local/bin}}). After that, mark it as executable:
 
Now you will need to move the script to an appropriate location (e.g., {{ic|/usr/local/bin}}). After that, mark it as executable:
 
  # chmod +x /usr/local/bin/obex_thunar.sh
 
  # 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 {{ic|obex_thunar.sh %d}}.
 
The last step is to change the line in ''Blueman tray icon > Local Services > Transfer > Advanced'' to {{ic|obex_thunar.sh %d}}.
  
== Blueman and PulseAudio ==
+
{{Out of date|It would appear that {{ic|thunar obex://%d}} is not functional. Also note that changing command should not be necessary as the system default file manager will be used by default - see release notes for 1.99.alpha2|Talk:Blueman#thunar obex:// support}}
  
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.
+
{{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''}}
  
== Troubleshooting ==
+
=== Blueman and PulseAudio ===
  
=== Blueman and Thunar ===
+
Users who want to use [[PulseAudio]] with a Bluetooth headset, in addition to [[install]]ing {{Pkg|pulseaudio-bluetooth}}, 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. For more information see [[Bluetooth headset]]
  
As long as you  have {{Pkg|gvfs-obexftp}} installed, you can use Thunar from Blueman to browse files remotely. Open up the Blueman services configuration window and replace:
+
== Configuration ==
nautilus --browse obex://
+
Configuration is done through {{Pkg|dconf}} (or gsettings or {{Pkg|dconf-editor}}).
with:
+
thunar obex://
+
  
=== Workaround for a Bug with obex and gvfs ===
+
=== Disable auto power-on ===
  
{{Note|This bug only afflict older versions of Blueman.}}
+
Blueman automatically enables Bluetooth adapter ({{ic||rfkill unblock bluetooth}}) when certain events (on boot, laptop lid is opened, ...) occur. This can be disabled with the {{ic|auto-power-on}} in {{ic|org.blueman.plugins.powermanager}}:
To browse mobile phone via nautilus with Blueman you need a patched ''gvfs''. Install {{AUR|gvfs-rar}} from [[AUR]].
+
obex-data-server package is broken for now and needs to rebuild with:
+
$ ./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.
+
$ gsettings set org.blueman.plugins.powermanager auto-power-on false
  
=== Workaround a bug with network manager in Bluetooth networking ===
+
== Troubleshooting ==
  
Some distributions show all Bluetooth interfaces as net.80203, which can cause strange behaviour in network manager,
+
=== Blueman applet does not start ===
for example NM trying to get dhcp address for an incoming connection.
+
  
{{Note|This bug only afflicts versions below 1.02.}}
+
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.
  
Put this in {{ic|/etc/hal/fdi/information/bnep.fdi}}:
+
=== No adapters detected ===
  
{{bc|<nowiki>
+
{{Accuracy|Is {{Pkg|rfkill}} genuinely required? It's not a {{Pkg|blueman}} dependency and my bluetooth adaptor is detected just fine by blueman without it.}}
<?xml version="1.0" encoding="UTF-8"?>
+
  
<deviceinfo version="0.2">
+
If your Bluetooth applet or manager doesn't show or detect any Bluetooth adapter, you might be missing {{Pkg|rfkill}}. Restart might be required.
<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>}}
+
  
=== Cannot receive files ===
+
=== Can't receive files ===
  
You have to edit {{ic|/etc/conf.d/bluetooth}} file and uncomment this line:
+
If you can't send or receive files and you encounter a python-dbus-exception error similar or exactly like {{ic|process org.bluez.obex exited with status 1}} then it is advised to start the obexd-service manually from {{ic|/usr/lib/bluetooth/obexd}} and see if that helps. Since the default permissions assume 755 it is possible to start the daemon from a user-account and/or create an autostarter.
  
#SDPD_ENABLE="true"
+
Should the error persist or another occur then try using {{Pkg|obexftp}} for file transfers instead, see [[Bluetooth#ObexFTP transfers]].
 
+
=== 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
+
# 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 again (looking at the code, it looks like some buttons should be displayed in the notification, but I don't see them).
+
  
 
== See also ==
 
== See also ==
  
https://bbs.archlinux.org/viewtopic.php?id=65889 - Discussion threads on problems
+
* [https://github.com/blueman-project/blueman Blueman development], on GitHub

Latest revision as of 12:16, 28 July 2016

Related articles

Blueman is a full featured Bluetooth manager written in GTK+. See the project page on Github.

Installation

Install either blueman or blueman-gitAUR (the development version).

Be sure to enable the Bluetooth daemon and start Blueman with blueman-applet. A graphical settings panel can be launched with blueman-manager.

Usage

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

To receive files remember to right click on the Blueman tray icon > Local Services > Transfer > File Receiving (Object Push) and tick the Accept files from trusted devices box.

To be able to manage devices, you might need to add your user to the lp group, else you might receive the following error when connecting to a device: DBusFailedError: No such file or directory. This is because the user needs to be authorized to communicate with the bluetooth daemon via D-Bus - the lp group is specified in /etc/dbus-1/system.d/bluetooth.conf. For information on adding a user to a group, see Users and groups#Other examples of user management.

Mounting Bluetooth devices

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.

Tango-view-refresh-red.pngThis article or section is out of date.Tango-view-refresh-red.png

Reason: It would appear that thunar obex://%d is not functional. Also note that changing command should not be necessary as the system default file manager will be used by default - see release notes for 1.99.alpha2 (Discuss in Talk:Blueman#thunar obex:// support)
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, in addition to installing pulseaudio-bluetooth, 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. For more information see Bluetooth headset

Configuration

Configuration is done through dconf (or gsettings or dconf-editor).

Disable auto power-on

Blueman automatically enables Bluetooth adapter () when certain events (on boot, laptop lid is opened, ...) occur. This can be disabled with the auto-power-on in org.blueman.plugins.powermanager:

$ gsettings set org.blueman.plugins.powermanager auto-power-on false

Troubleshooting

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.

No adapters detected

Tango-inaccurate.pngThe factual accuracy of this article or section is disputed.Tango-inaccurate.png

Reason: Is rfkill genuinely required? It's not a blueman dependency and my bluetooth adaptor is detected just fine by blueman without it. (Discuss in Talk:Blueman#)

If your Bluetooth applet or manager doesn't show or detect any Bluetooth adapter, you might be missing rfkill. Restart might be required.

Can't receive files

If you can't send or receive files and you encounter a python-dbus-exception error similar or exactly like process org.bluez.obex exited with status 1 then it is advised to start the obexd-service manually from /usr/lib/bluetooth/obexd and see if that helps. Since the default permissions assume 755 it is possible to start the daemon from a user-account and/or create an autostarter.

Should the error persist or another occur then try using obexftp for file transfers instead, see Bluetooth#ObexFTP transfers.

See also