LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 08-03-2013, 01:37 PM   #1
HaroldWho
Member
 
Registered: Nov 2006
Location: southeastern PA
Distribution: Slackware
Posts: 130

Rep: Reputation: 23
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.
 
Old 08-04-2013, 11:07 PM   #2
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,669

Rep: Reputation: 498Reputation: 498Reputation: 498Reputation: 498Reputation: 498
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.
 
2 members found this post helpful.
Old 08-05-2013, 02:30 PM   #3
HaroldWho
Member
 
Registered: Nov 2006
Location: southeastern PA
Distribution: Slackware
Posts: 130

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

Thanks
 
Old 08-07-2013, 02:37 PM   #4
HaroldWho
Member
 
Registered: Nov 2006
Location: southeastern PA
Distribution: Slackware
Posts: 130

Original Poster
Rep: Reputation: 23
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.
 
Old 08-09-2013, 02:06 PM   #5
HaroldWho
Member
 
Registered: Nov 2006
Location: southeastern PA
Distribution: Slackware
Posts: 130

Original Poster
Rep: Reputation: 23
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
 
Old 08-12-2013, 09:06 AM   #6
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639

Rep: Reputation: Disabled
Quote:
Originally Posted by malekmustaq View Post
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

Last edited by BCarey; 08-12-2013 at 09:08 AM.
 
1 members found this post helpful.
Old 08-12-2013, 02:12 PM   #7
HaroldWho
Member
 
Registered: Nov 2006
Location: southeastern PA
Distribution: Slackware
Posts: 130

Original Poster
Rep: Reputation: 23
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.
 
Old 03-16-2014, 03:55 PM   #8
lecho
Member
 
Registered: Jan 2013
Location: Warsaw, Poland
Distribution: Slackware
Posts: 32

Rep: Reputation: Disabled
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.
 
Old 03-17-2014, 02:51 PM   #9
HaroldWho
Member
 
Registered: Nov 2006
Location: southeastern PA
Distribution: Slackware
Posts: 130

Original Poster
Rep: Reputation: 23
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.
 
Old 03-17-2014, 04:31 PM   #10
lecho
Member
 
Registered: Jan 2013
Location: Warsaw, Poland
Distribution: Slackware
Posts: 32

Rep: Reputation: Disabled
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.
 
  


Reply



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] Blueman-manager works but no graphic interface afreitascs Slackware 11 11-21-2010 07:43 PM
Two scripts, one runs with the other only runs as root halfpower Slackware 8 04-11-2009 04:05 PM
Code runs as root? neo_in_matrix Programming 5 06-08-2005 09:38 PM
x only runs in root Bigfut Red Hat 1 08-19-2004 02:43 AM
Firefox only runs as root Rundi Linux - Software 6 03-13-2004 12:28 AM

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

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

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
Open Source Consulting | Domain Registration