[wplug] tricking the kernel

Henry Umansky hmust2+ at pitt.edu
Wed Sep 17 09:17:27 EDT 2003


Here's a weird one.  On my laptop I have the built in touchpad that is set 
as my "CorePointer" (/dev/psaux) in /etc/X11/XF86Config, and I also have my 
USB mouse set as the "AlwaysCore" (/dev/input/mice).  I'm using devfs so 
all the devices are created at bootup.  The problem with this is, if I 
don't have my USB mouse plugged in, then X gives me an error 
"/dev/input/mice does not exist" and then when I plug the USB mouse in, I 
have to restart X in order to use it.  So then I thought that if I do a 
mknod for my USB device so that /dev/input/mice will always be there, X 
still doesn't recognize the device when its not plugged in.  However I did 
notice something odd, before I start X if I do a "cat /dev/input/mice" I 
get an error of no device found, but when I plug the USB mouse in then 
unplug it right away then do another "cat /dev/input/mice" I don't get any 
error, it just hangs there till I press CTRL-C.  When I'm at that point I 
can start X and after X is loaded, I can plug in the USB mouse and it will 
work fine.  I apologize if any of this doesn't make sense, but essentially 
I want to know if there is a way to trick the kernel (or X) to think the 
USB mouse is there even if it is not plugged in.

Thank you,
Henry

Aoccdrnig to rscheearch at an Elingsh uinervtisy, it deosn't mttaer in waht 
oredr the ltteers in a wrod are, the olny iprmoetnt tihng is taht  frist 
and lsat ltteres are at the rghit pclae.The rset can be a toatl mses and 
you can sitll raed it wouthit porbelm. Tihs is bcuseae we do not raed ervey 
lteter by it slef but the wrod as a wlohe.




More information about the wplug mailing list