LinuxQuestions.org
Visit Jeremy's Blog.
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, 02:37 PM   #1
HaroldWho
Member
 
Registered: Nov 2006
Location: southeastern PA
Distribution: Slackware
Posts: 130

Rep: Reputation: 22
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-05-2013, 12:07 AM   #2
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: /root
Distribution: Slackware & BSD
Posts: 1,220

Rep: Reputation: 231Reputation: 231Reputation: 231
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, 03:30 PM   #3
HaroldWho
Member
 
Registered: Nov 2006
Location: southeastern PA
Distribution: Slackware
Posts: 130

Original Poster
Rep: Reputation: 22
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, 03:37 PM   #4
HaroldWho
Member
 
Registered: Nov 2006
Location: southeastern PA
Distribution: Slackware
Posts: 130

Original Poster
Rep: Reputation: 22
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, 03:06 PM   #5
HaroldWho
Member
 
Registered: Nov 2006
Location: southeastern PA
Distribution: Slackware
Posts: 130

Original Poster
Rep: Reputation: 22
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, 10:06 AM   #6
BCarey
Senior Member
 
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,489

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 10:08 AM.
 
1 members found this post helpful.
Old 08-12-2013, 03:12 PM   #7
HaroldWho
Member
 
Registered: Nov 2006
Location: southeastern PA
Distribution: Slackware
Posts: 130

Original Poster
Rep: Reputation: 22
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, 04:55 PM   #8
lecho
LQ Newbie
 
Registered: Jan 2013
Location: Warsaw, Poland
Distribution: Slackware
Posts: 5

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, 03:51 PM   #9
HaroldWho
Member
 
Registered: Nov 2006
Location: southeastern PA
Distribution: Slackware
Posts: 130

Original Poster
Rep: Reputation: 22
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, 05:31 PM   #10
lecho
LQ Newbie
 
Registered: Jan 2013
Location: Warsaw, Poland
Distribution: Slackware
Posts: 5

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


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


All times are GMT -5. The time now is 11:38 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration