Select mouse at boot time
I'm running Slack 10.2 on a laptop and I would like to configure the mouse at boot time. If I have my usb mouse connected run gpm with the '-t imps2' option otherwise run it with the '-t ps2' option. Is there any way to check if the usb mouse is connected?
TIA for any help! |
Don't know,maybe the option auto will work for both.
|
nope it did not work
|
Yep, this should be very possible (I might have to try it on my laptop, it looks good!).
Reading the gpm man page here: http://www.die.net/doc/linux/man/man8/gpm.8.html Indicates a -M option that will read multiple devices. Presumably, if your usb isn't plugged in, it'll just ignore it) but if it is, it'll work fine - you will need to test this. The script you need to edit to make this work is: /etc/rc.d/rc.gpm You may wish to back it up first, and don't forget you can always stop/start/restart it without rebooting by using the following options: Code:
/etc/rc.d/rc.gpm stop - Piete. |
now based on this how do I redirect /dev/mouse to the appropriate device /dev/psaux or /dev/input/mice? my xorg.conf is pointing to /dev/mouse and if the link is not pointing to a working device it complains and dies.
|
rm /dev/mouse
ln -s /dev/whateveryouneed /dev/mouse ln -s = to create symbolic links |
In Xorg you can set both devices to run at once without using gpm at all if you set the builtin point to "AlwaysCore" and the USB to "SendCoreEvents".
Check here (http://www.die.net/doc/linux/man/man5/xorg.conf.5.html) for the man page of xorg.conf and here (http://www.kaear.co.uk/linux/xconf/XF86Config.laptop) for my laptop's current xorg.conf file. |
Quote:
Code:
Section "InputDevice Use my USB mouse if it is plugged (usually @ home or the office) Use the glide mouse on the laptop when an USB mouse is not connected (in planes, etc) |
Ok, I think you're Xorg.conf is probably incorrect if it's not working.
First of all, we're not writing Xorg.conf to "choose" a mouse, merely telling it to use more than one mouse. If I don't have my usb plugged in when I startx, it just gets ignored. If my usb *is* plugged in, then not only can I use my usb mouse, but also my trackpoint. The steps to get this working are as follows: 1. Find your USB mouse device (/dev/input/mice ?) - cat /dev/input/mice and wiggle the device about to check it's correct. 2. Do the same with your touchpad (/dev/psaux ?) 3. Add both devices as separate inputdevices in your xorg.conf file (as above) 4. Edit your ServerLayout section to look similar to: Code:
Section "ServerLayout" |
I changed my xorg.conf on InputDevice Section and ServerLayout and now KDE doesn't start. It gets stack on "Starting X11 session...". The problem is that I have runlevel 4 so KDE starts automatically and now I have no idea how I could get to shell to change from there my xorg.conf. Any suggestions?
|
If you boot into runlevel 3 while testing this stuff it's easy to fix if it doesn't work =)
However, since you're booting into 4, ctrl + alt + F6 will get you a standard login prompt. Login as root and type: init 3 This'll put you in runlevel 3 where you can use joe/jed/vi/vim/pico/nano (delete as appropriate) to edit xorg.conf. When you've tweaked it a bit, run startx from some other TTY (as user, not root) and note the output of startx, it'll tell you what the problem is exactly (ok, it might be obfuscated a bit). The error messages will help us track down the issue. - Piete. |
Well, I was looking at the output of error messages and there were some incorrect typings among the lines in xorg.conf like "End Section" instead of "EndSection". I edited to the original form and X started. Then I tried again to configure it, so my touchpad will be working and I had to change at the ServerLayout "Screen0" to "Screen1" and "Keyboard0" to "Keyboard1". Now everything works fine!:)
|
w00h00! *does the fixx0red groove*
Ooh yeah, ooh yeah ... *dances* I'm glad it works for you, hope you learnt a lot ;) - Piete. |
Quote:
Dude a million thanks for your help and pacience! It works like a charm. :D |
All times are GMT -5. The time now is 05:41 AM. |