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: Frugal install with PS2 And Usb Mouse< Next Oldest | Next Newest >
Headly Offline





Group: Members
Posts: 38
Joined: July 2005
Posted: Dec. 16 2005,09:01 QUOTE

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





Group: Members
Posts: 4264
Joined: Oct. 2003
Posted: Dec. 17 2005,04:34 QUOTE

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





Group: Members
Posts: 38
Joined: July 2005
Posted: Dec. 17 2005,05:48 QUOTE

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 ==============================================================
Back to top
Profile PM 
larkl Offline





Group: Members
Posts: 177
Joined: Sep. 2005
Posted: Dec. 17 2005,12:53 QUOTE

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!
Back to top
Profile PM 
Headly Offline





Group: Members
Posts: 38
Joined: July 2005
Posted: Dec. 17 2005,23:36 QUOTE

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
Back to top
Profile PM 
4 replies since Dec. 16 2005,09:01 < Next Oldest | Next Newest >

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

 
reply to topic new topic new poll
Quick Reply: Frugal install with PS2 And Usb Mouse

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