LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-01-2017, 10:31 AM   #31
limpingstone
Member
 
Registered: Mar 2017
Location: Mountain Time Area
Distribution: Slackware64 14.2
Posts: 52

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by Richard Cranium View Post
OK, do you see...
Code:
  <!-- allow users of lp group (printing subsystem) to 
       communicate with bluetoothd -->
  <policy group="lp">
    <allow send_destination="org.bluez"/>
  </policy>
...in /etc/dbus-1/system.d/bluetooth.conf?
Code:
  <policy at_console="true">
    <allow send_destination="org.bluez"/>
  </policy>

  <!-- allow users of lp group (printing subsystem) to
       communicate with bluetoothd -->
  <policy group="lp">
    <allow send_destination="org.bluez"/>
  </policy>

  <policy context="default">
    <deny send_destination="org.bluez"/>
  </policy>
 
Old 04-02-2017, 12:41 AM   #32
limpingstone
Member
 
Registered: Mar 2017
Location: Mountain Time Area
Distribution: Slackware64 14.2
Posts: 52

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Richard Cranium View Post
OK, do you see...
Code:
  <!-- allow users of lp group (printing subsystem) to 
       communicate with bluetoothd -->
  <policy group="lp">
    <allow send_destination="org.bluez"/>
  </policy>
...in /etc/dbus-1/system.d/bluetooth.conf?
It's the same as mine, so how should I change it?
I noticed the group lp and I'm sure my account is in the group:

Code:
bash-4.3$ groups
users lp wheel floppy audio video cdrom plugdev power netdev scanner
 
Old 04-02-2017, 01:06 AM   #33
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.2
Posts: 2,939

Rep: Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331
OK, I don't normally use KDE, but I started it up on a spare laptop that's running Slackware64 14.2.

KDE uses bluedevil, so make sure that the bluedevil package is installed. If you have a bluetooth dongle as I do, make sure that it was plugged in during boot or bluetoothd won't start.

I got the bluetooth symbol in the task bar immediately after starting bluetoothd. KDE's "System Settings" had a bluetooth icon in the "Network and Connectivity" section.
 
Old 04-04-2017, 04:38 PM   #34
limpingstone
Member
 
Registered: Mar 2017
Location: Mountain Time Area
Distribution: Slackware64 14.2
Posts: 52

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Richard Cranium View Post
OK, I don't normally use KDE, but I started it up on a spare laptop that's running Slackware64 14.2.

KDE uses bluedevil, so make sure that the bluedevil package is installed. If you have a bluetooth dongle as I do, make sure that it was plugged in during boot or bluetoothd won't start.

I got the bluetooth symbol in the task bar immediately after starting bluetoothd. KDE's "System Settings" had a bluetooth icon in the "Network and Connectivity" section.
After messing around with the computer for another few days, I decided to give up and created another new account while adding it to the essential groups at the moment of creation. Bluetooth seems to be working very well!
I believe it's probably the wrong parameters that's not set up properly the first time I set up the account, for I manually added the groups later instead.

Still I learned a lot from all of you. Thank you all!
 
Old 06-13-2018, 02:44 PM   #35
websafe
LQ Newbie
 
Registered: May 2008
Location: Opole, PL
Distribution: Slackware, CentOS
Posts: 15

Rep: Reputation: 1
Cool

I had the exactly same problem. A fresh Slackware64 14.2 installation.
Bluetooth Manager (blueman-manager) was working fine as root,
but as a normal user it wouldn't start.

Running `blueman-manager` or `blueman-applet` from the console
showed some ~ "dbus access denied" errors...

Then I found this: https://bugs.debian.org/cgi-bin/bugr...cgi?bug=736744


The solution is simple:

1) In /etc/dbus-1/system.d/bluetooth.conf find this:

Code:
 <policy at_console="true">
    <allow send_destination="org.bluez"/>
  </policy>
and replace true with false:

Code:
 <policy at_console="false">
    <allow send_destination="org.bluez"/>
  </policy>

2) Reboot.


Now the Bluetooth manager should work as expected on
a normal (non-root) user account the same way it worked
on the root account.

The "normal user" doesn't need to be in any "fancy" groups,
I'm testing now without all these additional groups
and it works, because that's not a group permission problem,
it's a "dbus permission problem", whatever this means ;-)

Code:
bash-4.3$ groups
users
Of course adding the user to lp,floppy,audio,video,cdrom,plugdev,power,netdev,scanner
makes sense and is sometimes required but it's not relevant to the
Bluetooth Manager / Applet problem for non-root users, because they work without
these groups, only /etc/dbus-1/system.d/bluetooth.conf
needs to be modified as mentioned above.


Peace and love :-)
 
Old 06-13-2018, 03:29 PM   #36
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.2
Posts: 2,939

Rep: Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331
The slackware solution is even easier: add your user to the lp group, log out, and log back in.
 
1 members found this post helpful.
Old 06-13-2018, 06:03 PM   #37
websafe
LQ Newbie
 
Registered: May 2008
Location: Opole, PL
Distribution: Slackware, CentOS
Posts: 15

Rep: Reputation: 1
Cool

Richard, I've tried this, and it was not working. I've even done things like:

Code:
usermod -a -G $(cut -d':' -f1 /etc/group | tr "\n" ",")users myusername
The result was the same - Bluetooth Manager not working under KDE because of dbus errors.


It worked after editing `bluetooth.conf`, as mentioned before and without
assigning the user to other groups that `users`.
 
Old 06-13-2018, 06:07 PM   #38
websafe
LQ Newbie
 
Registered: May 2008
Location: Opole, PL
Distribution: Slackware, CentOS
Posts: 15

Rep: Reputation: 1
https://bugzilla.redhat.com/show_bug.cgi?id=1094750
 
Old 06-13-2018, 08:48 PM   #39
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.2
Posts: 2,939

Rep: Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331
Code:
$ cat /etc/dbus-1/system.d/bluetooth.conf
<!-- This configuration file specifies the required security policies
     for Bluetooth core daemon to work. -->

<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
 "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>

  <!-- ../system.conf have denied everything, so we just punch some holes -->

  <policy user="root">
    <allow own="org.bluez"/>
    <allow send_destination="org.bluez"/>
    <allow send_interface="org.bluez.Agent1"/>
    <allow send_interface="org.bluez.MediaEndpoint1"/>
    <allow send_interface="org.bluez.MediaPlayer1"/>
    <allow send_interface="org.bluez.ThermometerWatcher1"/>
    <allow send_interface="org.bluez.AlertAgent1"/>
    <allow send_interface="org.bluez.Profile1"/>
    <allow send_interface="org.bluez.HeartRateWatcher1"/>
    <allow send_interface="org.bluez.CyclingSpeedWatcher1"/>
    <allow send_interface="org.bluez.GattCharacteristic1"/>
    <allow send_interface="org.bluez.GattDescriptor1"/>
    <allow send_interface="org.freedesktop.DBus.ObjectManager"/>
    <allow send_interface="org.freedesktop.DBus.Properties"/>
  </policy>

  <policy at_console="true">
    <allow send_destination="org.bluez"/>
  </policy>

  <!-- allow users of lp group (printing subsystem) to 
       communicate with bluetoothd -->
  <policy group="lp">
    <allow send_destination="org.bluez"/>
  </policy>

  <policy context="default">
    <deny send_destination="org.bluez"/>
  </policy>

</busconfig>

$ groups
users lp wheel audio video cdrom plugdev power scanner docker kvm

$ id
uid=1000(cranium) gid=100(users) groups=100(users),7(lp),10(wheel),17(audio),18(video),19(cdrom),83(plugdev),84(power),93(scanner),281(docker),1000(kvm)


$ dbus-send --system --print-reply --dest=org.bluez /org/bluez org.freedesktop.DBus.Introspectable.Introspect
method return time=1528940357.828593 sender=:1.0 -> destination=:1.82 serial=102 reply_serial=2
   string "<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node><interface name="org.freedesktop.DBus.Introspectable"><method name="Introspect"><arg name="xml" type="s" direction="out"/>
</method></interface><interface name="org.bluez.AgentManager1"><method name="RegisterAgent"><arg name="agent" type="o" direction="in"/>
<arg name="capability" type="s" direction="in"/>
</method><method name="UnregisterAgent"><arg name="agent" type="o" direction="in"/>
</method><method name="RequestDefaultAgent"><arg name="agent" type="o" direction="in"/>
</method></interface><interface name="org.bluez.ProfileManager1"><method name="RegisterProfile"><arg name="profile" type="o" direction="in"/>
<arg name="UUID" type="s" direction="in"/>
<arg name="options" type="a{sv}" direction="in"/>
</method><method name="UnregisterProfile"><arg name="profile" type="o" direction="in"/>
</method></interface><node name="hci0"/></node>"

$ ps -ef | grep blue
root        2243     1  0 Jun10 ?        00:00:00 /usr/sbin/bluetoothd
cranium     3444  3228  0 Jun10 ?        00:00:00 /usr/bin/python2.7 /usr/bin/blueman-applet
cranium     3552     1  0 Jun10 ?        00:00:00 /usr/libexec/bluetooth/obexd
cranium     7464  6580  0 20:42 pts/0    00:00:00 grep blue
Adding my user to the lp group has worked on all of my machines that have had my usb bluetooth dongle on it. One desktop and two laptop systems.
 
1 members found this post helpful.
Old 06-14-2018, 02:10 PM   #40
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.2
Posts: 2,939

Rep: Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331
As a followup, however, I noticed that adding a user to the lp group, logging out and logging back in did not work. After a reboot of the server in question, the dbus-send commands started to work.

There appears to be something cached that wasn't cleared by the logout; I'll look some more tonight after work to see what that could be.
 
1 members found this post helpful.
Old 06-14-2018, 08:57 PM   #41
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.2
Posts: 2,939

Rep: Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331
OK, after you add a user to the lp group, you must
  1. As root, run /etc/rc.d/rc.messagebus reload (or reboot)
  2. Logout that user
  3. Log in with that user

I just tested that sequence on my laptop with new users. (Don't run /etc/rc.d/rc.messagebus restart for you will have to restart bluetooth, NetworkManager, and any desktop environment that you've got running. As I found out.)
 
3 members found this post helpful.
Old 06-15-2018, 01:26 PM   #42
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: Newport News, VA
Distribution: Slackware
Posts: 5,079

Rep: Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867Reputation: 2867
Quote:
Originally Posted by websafe View Post
The "normal user" doesn't need to be in any "fancy" groups,
I'm testing now without all these additional groups
and it works, because that's not a group permission problem,
it's a "dbus permission problem", whatever this means ;-)

Code:
bash-4.3$ groups
users
Of course adding the user to lp,floppy,audio,video,cdrom,plugdev,power,netdev,scanner
makes sense and is sometimes required but it's not relevant to the
Bluetooth Manager / Applet problem for non-root users, because they work without
these groups, only /etc/dbus-1/system.d/bluetooth.conf
needs to be modified as mentioned above.
You're missing the reason for these groups. Not every admin wants every user to have access to bluetooth. That is why it is assigned to a group (I don't really agree with it being the lp group, but for some reason, my input was not asked when the decision was made ). This way, only certain users have access to bluetooth. Now, any user that logs in, whether local or remote, can access your bluetooth. There's a reason I don't assign most of my remote users to certain groups, because they have no business using bluetooth, usb devices, etc. while they're on a remote connection. Now, on your system, you may want all users to have access to everything. That is acceptable for you, but not for everyone.

This is why Pat has made it easy with the adduser script, which allows you to automatically assign new users to the recommended groups, which would've completely alleviated your issue and would've never required editing that file. You may also run into additional permission problems with you not being assigned to other groups (although, I imagine since you're not seeing them, that you're starting at runlevel 3, which will automatically assign logged in users to groups the user isn't necessarily assigned to).

@Richard, thanks for the extra details on how to get users recently added to the lp group to allow bluetooth usage. I'm sure that will come in handy at some point.
 
Old 06-15-2018, 03:25 PM   #43
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: Carrollton, Texas
Distribution: Slackware64 14.2
Posts: 2,939

Rep: Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331Reputation: 1331
Quote:
Originally Posted by bassmadrigal View Post
@Richard, thanks for the extra details on how to get users recently added to the lp group to allow bluetooth usage. I'm sure that will come in handy at some point.
Like most of us, I dislike giving bad advice; since the log-out/log-in sequence wouldn't actually work by itself, I wanted to find the least painful additional step(s) that would make it work.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Bluetooth works in root but not user BW-userx Slackware 81 06-14-2018 10:43 PM
[SOLVED] bluetooth headset works only on root husarz Slackware 5 12-27-2016 05:40 PM
Bluetooth Is Not Working Ashish Sood Linux - General 1 08-27-2010 01:55 PM
[SOLVED] Bluetooth is not working shariefbe Linux - Newbie 1 01-29-2010 12:23 AM
Bluetooth not working on FC6 with Targus USB bluetooth adapter mikevicious Linux - Software 1 12-11-2009 09:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration