Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
 

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: I need a script, Instant transfer for mouse< Next Oldest | Next Newest >
Johnnie Price Offline





Group: Members
Posts: 32
Joined: Sep. 2006
Posted: Oct. 13 2006,23:23 QUOTE

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?
Back to top
Profile PM 
^thehatsrule^ Offline





Group: Members
Posts: 3275
Joined: July 2006
Posted: Oct. 16 2006,17:07 QUOTE

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)
Back to top
Profile PM 
Johnnie Price Offline





Group: Members
Posts: 32
Joined: Sep. 2006
Posted: Oct. 16 2006,23:11 QUOTE

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.
Back to top
Profile PM 
^thehatsrule^ Offline





Group: Members
Posts: 3275
Joined: July 2006
Posted: Oct. 17 2006,15:09 QUOTE

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
Back to top
Profile PM 
Johnnie Price Offline





Group: Members
Posts: 32
Joined: Sep. 2006
Posted: Oct. 18 2006,22:55 QUOTE

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. ;)
Back to top
Profile PM 
4 replies since Oct. 13 2006,23:23 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

 
reply to topic new topic new poll
Quick Reply: I need a script

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code