Difference between revisions of "Blueman"

From ArchWiki
Jump to: navigation, search
(Added a section from Bluetooth.)
(Section moved from bluetooth. Style fixes.)
Line 1: Line 1:
 
[[Category:Bluetooth]]
 
[[Category:Bluetooth]]
This is a collection of tips and information regarding '''blueman''', a GTK+ bluetooth manager.
+
[http://blueman-project.org Blueman] is a full featured Bluetooth manager written in [[GTK+]] and, as such, is recommended for [[GNOME]], [[Xfce]], or [[LXDE]].
  
 
== Installation ==
 
== Installation ==
Line 6: Line 6:
 
[[pacman|Install]] {{Pkg|blueman}} from the [[official repositories]].
 
[[pacman|Install]] {{Pkg|blueman}} from the [[official repositories]].
  
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}}.
 +
 
 +
== 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.
 +
 
 +
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]].
 +
 
 +
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.
 +
 
 +
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 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.}}
 +
 
 +
==== Generic file manager script ====
 +
 
 +
If you are not using Nautilus (for example Thunar) you may find the following script useful:
 +
{{hc|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., {{ic|/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 {{ic|obex_thunar.sh %d}}.
  
 
== Blueman and PulseAudio ==
 
== 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.
+
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 ==
 
== Troubleshooting ==
Line 16: Line 41:
 
=== Blueman and Thunar ===
 
=== Blueman and Thunar ===
  
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
+
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:
 
  nautilus --browse obex://
 
  nautilus --browse obex://
with
+
with:
 
  thunar obex://
 
  thunar obex://
  
Line 24: Line 49:
  
 
{{Note|This bug only afflict older versions of blueman.}}
 
{{Note|This bug only afflict older versions of blueman.}}
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
+
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:
 
obex-data-server package is broken for now and needs to rebuild with:
 
  $ ./configure --prefix=/usr --sysconfdir=/etc
 
  $ ./configure --prefix=/usr --sysconfdir=/etc

Revision as of 21:04, 12 September 2013

Blueman is a full featured Bluetooth manager written in GTK+ and, as such, is recommended for GNOME, Xfce, or LXDE.

Installation

Install blueman from the official repositories.

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

Usage

Be sure the local Bluetooth device is availabe by running hcitool dev. If only 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 Fn+F3 in Acer Aspire or reboot to activate the local Bluetooth device. If you run blueman-applet without available local Bluetooth device, the Blueman tray icon will not appear.

Then execute blueman-applet, and the Blueman tray icon will show up. /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 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.

In order for a user to add and manage Bluetooth devices using Blueman, the user must be added to the lp group. 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 outside GNOME/GDM (e.g., in Xfce using the startx command) you should add source /etc/X11/xinit/xinitrc.d/* on top of your ~/.xinitrc to make Nautilus capable to browse your devices.

Generic file manager script

If you are not using Nautilus (for example Thunar) you may find the following script useful:

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.

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

Blueman and Thunar

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:

nautilus --browse obex://

with:

thunar obex://

Workaround for a Bug with obex and gvfs

Note: This bug only afflict older versions of blueman.

To browse mobile phone via nautilus with blueman you need a patched gvfs. Install gvfs-rarAUR 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.

Workaround a bug with network manager in bluetooth networking

Some distributions show all bluetooth interfaces as net.80203, which can cause strange behaviour in network manager, for example NM trying to get dhcp address for an incoming connection.

Note: This bug only afflicts versions below 1.02.

Put this in /etc/hal/fdi/information/bnep.fdi:

<?xml version="1.0" encoding="UTF-8"?>

<deviceinfo version="0.2">
 <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>

Can't receive files

You have to edit /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
# 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 again (looking at the code, it looks like some buttons should be displayed in the notification, but I don't see them).

See also

https://bbs.archlinux.org/viewtopic.php?id=65889 - Discussion threads on problems