Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Bluetooth Mouse: reattach after timeout without X restart?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
r.abbott
Tux's lil' helper
Tux's lil' helper


Joined: 16 Aug 2004
Posts: 113
Location: Herat, Afghanistan

PostPosted: Tue Apr 12, 2005 2:41 pm    Post subject: Bluetooth Mouse: reattach after timeout without X restart? Reply with quote

I have a Macally Bluetooth Mouse Jr. working. My question is this: after sitting idle for a while, the mouse goes dormant. I can reconnect to the mouse using hidd, but xsetpointer to the new device name doesn't result in a working mouse as expected (it does nothing). If I restart X and reattach the mouse, everything works fine. Is there a way to reactivate the sleeping mouse and connect it to X without restarting X? I'm using xorg-x11-6.8.2-r1, kernel 2.6.11-suspend2.

Here is the script I use to attach the mouse:
Quote:
#!/usr/bin/perl

system "/usr/bin/hidd --unplug 00:11:09:1E:B1:1F" ;
print "Activate mouse and press <Enter>" ;
$targ = <STDIN> ;
system "/usr/bin/hidd --server" > null ;
system "/usr/bin/hidd --connect 00:11:09:1E:B1:1F" ;
print "Connected " ; system "/usr/bin/hidd --show" ;

exit (0);

I then use the following to set the X pointer to the mouse:
Quote:
#!/usr/bin/perl

system "ls /dev/input" ;
print "Enter device # to attach: " ;
$node = <STDIN> ;
system "/usr/bin/X11/xsetpointer Macally$node" ;
print "Ok.\n" ;
$dummy = sleep(3) ;
exit (0) ;

(I know, it's not very slick to make the user enter the device number. :oops: It counts up on successive mouse-sessions. Eg. /dev/input/mouse1 [next time:] /dev/input/mouse2 [next time:] /dev/input/mouse3 ... Restarting X resets it to mouse1)
Back to top
View user's profile Send private message
ravageNG
n00b
n00b


Joined: 29 Jul 2003
Posts: 46

PostPosted: Wed Apr 13, 2005 7:29 am    Post subject: Reply with quote

Had the same problem here.
Solved it with using /dev/input/mice in xorg.conf.
Works well now.

Hope it helps.
Back to top
View user's profile Send private message
r.abbott
Tux's lil' helper
Tux's lil' helper


Joined: 16 Aug 2004
Posts: 113
Location: Herat, Afghanistan

PostPosted: Wed Apr 13, 2005 3:57 pm    Post subject: Reply with quote

That's it -- thanks! :D
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum