You are not logged in.

#1 2009-08-05 08:54:47

Nareto
Member
From: Pisa,Italy
Registered: 2009-07-18
Posts: 148

Bluetooth mouse connection without pushing "connect" button on mouse

Hello,
In Ubuntu with gnome the pc would connect automatically to my logitech bluetooth mouse, without me having to push the "connect" button on the mouse.

The only way I've found now to connect to my mouse is by running

sudo hidd --search

*and* clicking the "connect" button on the mouse. I would like to:

1) not need sudo. Without sudo I get

renato@tosharch:~$ hidd --search -t 0
Searching ...
    Connecting to device 00:07:61:D1:87:B0
HID create error 13 (Permission denied)

2) not need to push the "connect" button on the mouse, so i could add the command to my ~/.xinitrc and have the mouse automatically recognized

what am I missing?

Renato

Last edited by Nareto (2009-08-05 08:55:30)

Offline

#2 2009-08-05 09:40:31

jelly
Administrator
From: /dev/null
Registered: 2008-06-10
Posts: 714

Re: Bluetooth mouse connection without pushing "connect" button on mouse

edit visudo and add  'hidd' to be run as non root. Check the sudo wiki for more info. Then you can run the second command you gave wich connected with the mouse

Offline

#3 2009-08-05 11:00:49

Nareto
Member
From: Pisa,Italy
Registered: 2009-07-18
Posts: 148

Re: Bluetooth mouse connection without pushing "connect" button on mouse

thanks, however I'm getting the same permission denied error. I'm not sure if I'm doing the right thing in visudo.  I tried adding to visudo

%users ALL = NOPASSWD: /usr/bin/hidd

and

%users ALL = NOPASSWD: /usr/bin/hidd --search -t 0

but, as said, I'm getting same error. I'm posting here below my visudo, as I think that some other things I have in it might affect this

root    ALL=(ALL) ALL

%wheel  ALL=(ALL) ALL

renato ALL = NOPASSWD: /usr/sbin/pm-suspend
%users ALL = NOPASSWD: /usr/bin/hidd

Offline

#4 2009-08-05 12:04:47

jelly
Administrator
From: /dev/null
Registered: 2008-06-10
Posts: 714

Re: Bluetooth mouse connection without pushing "connect" button on mouse

Edit visudo with running

 sudo visudo

You already have a line for suspending without super user powers so i would just modify that too

renato ALL = NOPASSWD: /usr/bin/hidd

i don't think you need to specify the arguments in visudo. Maybe do a :

 whereis hidd

to locate where hidd is. maybe it is in /sbin/

i hope this works, good luck

Offline

#5 2009-08-05 12:23:52

Nareto
Member
From: Pisa,Italy
Registered: 2009-07-18
Posts: 148

Re: Bluetooth mouse connection without pushing "connect" button on mouse

unfortunately it still gives the same error.

Offline

#6 2009-08-05 13:30:51

jelly
Administrator
From: /dev/null
Registered: 2008-06-10
Posts: 714

Re: Bluetooth mouse connection without pushing "connect" button on mouse

how does your visudo looks like ?

Offline

#7 2009-08-05 14:52:35

Nareto
Member
From: Pisa,Italy
Registered: 2009-07-18
Posts: 148

Re: Bluetooth mouse connection without pushing "connect" button on mouse

visudo:

# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
# Failure to use 'visudo' may result in syntax or file permission errors
# that prevent sudo from running.
#
# See the sudoers man page for the details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification

# Defaults specification

# Runas alias specification

# User privilege specification
root    ALL=(ALL) ALL

# Uncomment to allow people in group wheel to run all commands
%wheel  ALL=(ALL) ALL

# Same thing without a password
# %wheel        ALL=(ALL) NOPASSWD: ALL

# Samples
# %users  ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users  localhost=/sbin/shutdown -h now

renato ALL = NOPASSWD: /usr/sbin/pm-suspend
renato ALL = NOPASSWD: /usr/bin/hidd

Offline

#8 2009-08-10 10:09:13

Nareto
Member
From: Pisa,Italy
Registered: 2009-07-18
Posts: 148

Re: Bluetooth mouse connection without pushing "connect" button on mouse

anyone on this? Especially on number 2)... I still am not able to connect the mouse without pushing the "connect" button, even if I do

$ hidd --connect <mouseaddr>

I still need to push the button
As said in first post, in Ubuntu it would connect by just turning on the mouse, without pushing the button. Eventually I'll try asking on Ubuntu forums/mailing lists for how bt is set up.

Last edited by Nareto (2009-08-10 10:11:22)

Offline

#9 2009-08-11 01:34:23

biloky
Member
Registered: 2008-03-02
Posts: 61

Re: Bluetooth mouse connection without pushing "connect" button on mouse

@Nareto: bluez 4.39 has mouse connection issues. Try upgrading it to a latter version (>= 4.41).  Here's a related thread. smile

Offline

Board footer

Powered by FluxBB