I need a script


Forum: Laptops
Topic: I need a script
started by: Johnnie Price

Posted by Johnnie Price on Oct. 13 2006,23:23
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?

Posted by ^thehatsrule^ on Oct. 16 2006,17:07
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)

Posted by Johnnie Price on Oct. 16 2006,23:11
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.

Posted by ^thehatsrule^ on Oct. 17 2006,15:09
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 chance

Posted by Johnnie Price on Oct. 18 2006,22:55
I'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.

Ah well.  Thanks anyhow. ;)

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.