Frugal install with PS2 And Usb Mouse


Forum: HD Install
Topic: Frugal install with PS2 And Usb Mouse
started by: Headly

Posted by Headly on Dec. 16 2005,09:01
Hi There,
I have a frugal install and I originally installed it with a PS2 Mouse which worked fine.

I have since bought a new mini usb keyboard that has a note pad style touch pad (and two buttons) build in).

I tested the new keyboard and touchpad with my boot from CD version of dsl and it works fine.  

So I booted back to frugal and I have tried xsetup.sh and I can't get it to detect my usb touch pad.  The keyboard works fine.

I also intend to get a touch screen that I believe will have a ps2 connection for the mouse.  So for simple stuff I can just use an on screen keyboard and touch screen or connect the keyboard if I need it (and reboot if I have to)

So is it possible to set it up so that the mouse is detected at boot time.  With both mouses detected even?

At the risk of asking one two many questions :) how do you do a right click on a touch screen ?

As always any help much appricated.

David (Headly)

Posted by cbagger01 on Dec. 17 2005,04:34
Your touch pad may not be supported by the DSL xservers. This is especially true if you need to install special drivers for Microsoft Windows to be able to use it.

Try installing the xfree86.dsl extension and see if you can get it working with this device.  Others have done it for the Synaptics touchpad for laptops.

As for the touchscreen "Right-Click", my guess is that you cannot do a right-click.

Maybe some wierd driver can be written that interprets a triple-click as a standard right-click function, but this would be unusual.

Posted by Headly on Dec. 17 2005,05:48
Thanks for the reply.
I figured it out.  I just booted from my DSL boot cd again and checked out what the auto detection stuff  put in the .xserverrc file.  I then created two files one for each configuration.  

I then created a little script to swap the files back and forth.
So now it only takes a few seconds to change between the two.

David :)


cd /home/dsl
echo ===============================================================
grep  /dev/input/mice .xserverrc > /dev/null
if [ "$?" == "0" ]
then
  cp .xserverrc.ps2 .xserverrc
  echo "Mouse is now set to PS2"
else
  grep /dev/psaux .xserverrc > /dev/null
  if [ "$?" == "0" ]
  then
     cp .xserverrc.usb .xserverrc
     echo "Mouse is now set to USB"
  else
echo *** Error ***  Mouse is not recognised as ether PS2 or USB.   No change made
       echo ==============================================================
       exit
  fi
fi
echo Restart your GUI for this change to take effect
echo Press Ctrl Alt BackSpace then type startx at the prompt.
echo ==============================================================

Posted by larkl on Dec. 17 2005,12:53
Cool script!  So, does the $? read something other than zero if the grep sucessfully finds .xserverrc in the file?  (Sorry- slightly off topic).   Been toying with a bash script to run only if my wireless card doesn't come up.  YOu gave me an idea, thanks!
Posted by Headly on Dec. 17 2005,23:36
Hi There,
Basically the $? is the exit status of the previous command.
Generally 0 is success and something else for non success.
Often programs return an error number.

I have created 2 more files named .xserverrc.ps2 and .xserver.usb that have the mouse settings in them ready to go.

The grep looks for the string "/dev/input/mice" in .xserverrc
If it finds it then the copy command replaces the file with the file containing the ps2 device setting.  If it doesn't find it then it checks the .xserverrc file again for the string "/dev/psaux" and if found replaces the .xserverrc file with the one containing the usb device string.

If grep finds the string I'm looking for in the file it sends the line containing the string to the standard output which is normally the the screen. If it doesn't find it then it doesn't send anything.  I'm not interested in the line so I send it to /dev/null.

Then it sets $? to 0 if it finds it and non zero if it doesn't and exits.

I hope this makes sence.
David

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