View previous topic :: View next topic |
Author |
Message |
r.abbott Tux's lil' helper
Joined: 16 Aug 2004 Posts: 113 Location: Herat, Afghanistan
|
Posted: Tue Apr 12, 2005 2:41 pm Post subject: Bluetooth Mouse: reattach after timeout without X restart? |
|
|
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. 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 |
|
|
ravageNG n00b
Joined: 29 Jul 2003 Posts: 46
|
Posted: Wed Apr 13, 2005 7:29 am Post subject: |
|
|
Had the same problem here.
Solved it with using /dev/input/mice in xorg.conf.
Works well now.
Hope it helps. |
|
Back to top |
|
|
r.abbott Tux's lil' helper
Joined: 16 Aug 2004 Posts: 113 Location: Herat, Afghanistan
|
Posted: Wed Apr 13, 2005 3:57 pm Post subject: |
|
|
That's it -- thanks! |
|
Back to top |
|
|
|