LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   blueman-manager only runs as 'root' (http://www.linuxquestions.org/questions/slackware-14/blueman-manager-only-runs-as-root-4175472001/)

HaroldWho 08-03-2013 02:37 PM

blueman-manager only runs as 'root'
 
bluetoothd, btusb started a root, FWIW. blueman-manager owned by root but is world executable.

When blueman=manager is started as an ordinary user, this error occurs:

ERROR:dbus.proxies:Introspect error on org.bluez:/:
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied:
Rejected send message, 2 matched rules; type="method_call", ender=":1.5"
(uid=1000 pid=1976 comm="/usr/bin/python /usr/bin/blueman-manager ")
interface="org.freedesktop.DBus.Introspectable" member="Introspect" error
name="(unset)" requested_reply="0" destination="org.bluez" (uid=0 pid=1896

Starts and runs fine as root. No biggie, but it's annoying to handle d/l'd files.

Anyone know enough about dbus to say what's wrong; I sure don't.

malekmustaq 08-05-2013 12:07 AM

This is usual problem, at least to my experience.

First, create a bluetooth users group.

Code:

--# groupadd -g 998 blue
(or you may want to use existing 'netdev' or 'plugdev' groups)

Second, write a udev rule to make that bluetooth (device) owned and writable by the "blue" group. Here are good materials to learn how to write udev rules this and this, easy reading and quick to learn.


Then make the user(s) member to that group:

Code:

--# usermod -a blue username
Hope that works with you.

Good luck.

HaroldWho 08-05-2013 03:30 PM

Looks very promising. Both citations will need some study, at least by me. I hope to add a "Solved" tag soon,

Thanks

HaroldWho 08-07-2013 03:37 PM

Still trying to understand udev rules well enough not to screw everything up.

BUT, here's a puzzler. I'm running Slack 14, but I also have Slack 13.1 on my HD. Booted it up, and guess what...blueman-manager runs as user without a hitch. Nothing unusual to see in /etc/udev/rules.d either. Only difference I can see is Python 2.6 with Slack 13.1 vs 2.7.3 with Slack 14.

Very puzzling.

HaroldWho 08-09-2013 03:06 PM

Bummer. Nothing seems to enable blueman-manager to run under Slack 14 except as root.

Put this line in a 10local.rules file under /etc/udev/rules.d

Quote:

SUBSYST=="bluetooth", ATTR{address}=="00:02:72:d6:99:d0", GROUP="plugdev"
No joy. behavior same as before. Likewise (in desperation) this:

Quote:

SUBSYST=="bluetooth", ATTR{address}=="00:02:72:d6:99:d0", OWNER="hlarons"
BTW, I read "man hcitool" and "man hciconfig" and it's not at all clear (to me) how one might pair a Bluetooth cellphone with the linux box via the command line.

I'm tired of wasting more time on this; I'll just have to be content with running blueman-manager as root.

HaroldWho

BCarey 08-12-2013 10:06 AM

Quote:

Originally Posted by malekmustaq (Post 5002951)
Then make the user(s) member to that group:

Code:

--# usermod -a blue username

I believe your syntax should be
Code:

usermod -a -G blue username
Careful with this, because if you leave out the -a then your user will be a member of the blue group but lose all the other groups. I believe the preferred tool in Slackware is gpasswd, so
Code:

gpasswd -a user group
might be better.

Also, don't forget that you need to log out and log back in for the new group assignments take effect. Similarly you might try to restart udev or reload the rules after you make changes.
Code:

udevadmn control --reload-rules
does that. According to the man pages this "is usually not needed" but easy to try. I may be just pointing out the obvious...hope it helps.

Brian

HaroldWho 08-12-2013 03:12 PM

OK, I marked this SOLVED but it should have been marked KLUGED. I couldn't forget that my Slack 13.1 didn't have this problem, without any special udev rules. So, I did a quick-and-dirty:

Add /etc/modprobe.d/blacklist.conf with
Quote:

blacklist bluetooth
blacklist btusb
Add /etc/modprobe.d/bluetooth.conf with
Quote:

options btusb reset=1
Now to use bluetooth I just run:
Quote:

bluetoothd
modprobe btusb
I start blueman-manager as root, do the pairing juju, and I can run all the obexftp commands as a normal user. Not elegant, but works for me.

Sincere thanks to all who replied.

lecho 03-16-2014 04:55 PM

Not sure if it is still interesting for you but this is how it works for me (running blueman-manager as a non-root user). Check if the user is in the lp group (why - see https://wiki.archlinux.org/index.php/Blueman). If not - add the user to the lp group. A standard sequence logout, login after adding group doesn't work so you can use a brute force method (reboot) or try to restart messagebus daemon (/etc/rc.d/rc.messagebus). It can also need restarting your window manager and maybe bluetooth daemon.

HaroldWho 03-17-2014 03:51 PM

Thanks for your continued interest. I *am* a member of the 'lp' group. I've just accepted that I need to start blueman-manager as root, but I can still be an ordinary user for the obexftp stuff.

lecho 03-17-2014 05:31 PM

Of course it's not a big problem but still strange. I am running Slackware 14.1 but it seems that the bluez and blueman packages are almost identical as in 14. Best regards.


All times are GMT -5. The time now is 02:54 AM.