So, I've got this wireless optical mouse for my laptop, for when I'm home and using it as a desktop. What I'd like to know is if there is a way to write a script that will either automatically detect between the USB mouse and the touchpad, and use whichever is available. Or a script that I can run in fluxbox to choose simply the mouse.
Any ideas on where to start?Is your touchpad detected as ps/2 or usb? If it's ps/2, then its as simple as running xsetup.sh again.
If theyre both detected as USB, you can experiment around with the .xserverrc file, changing /dev/input/mice with /dev/input/mouse# (or maybe other physical device descriptors...)
Once you got that up, I suppose you could write something to check lsusb or something for an auto setup script
Of course, this is assuming you're running the TinyX server still (not using the XFree86* extensions)TinyX, yes.
The touchpad is a ps/2, the mouse is usb. I know I can change it with xsetup.sh, but the whole purpose of the script is so I don't have to exit X and reconfig then restart.
Plus it'd be handy for when I'm on the go and don't have the usb mouse on hand.
Quote
the whole purpose of the script is so I don't have to exit X and reconfig then restart.
Well, I think with the tinyx server you have to restart X anyways to change its options. Did you check if you could specify both mice as parameters?
If you have the resources, I'd suggest for you to try one of the XFree86* extensions out (if the above doesn't work and you run out of ideas) where you may have a better chanceI'm sure my laptop has the resources, but I'm pretty happy with TinyX. And it doesn't appear as if I can have both mice operational at the same time.