LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Laptop and Netbook (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/)
-   -   switching between laptop touch pad and USB mouse (https://www.linuxquestions.org/questions/linux-laptop-and-netbook-25/switching-between-laptop-touch-pad-and-usb-mouse-63577/)

unitcoed 06-04-2003 03:56 AM

switching between laptop touch pad and USB mouse
 
hi!
The situtation is: when at home I use a USB mouse, and when out and about I use my laptop's touch pad. But the problem is whenever i want to switch between the two, I need to restart the computer :(, to get the different settings to work.

is there anyway to make both devices work simultaniously; so that I dont have to keep restarting linux!?!

Details:

Red Hat 9.0
Toshiba Satellite 3000 PIII 1ghz

thanks in advance!!
-kris

moses 06-04-2003 10:31 AM

Define both mice in your XF86Config in a manner similar to this:
Code:

Section "InputDevice"
        Identifier      "Touchpad"
        Driver          "mouse"
        Option          "CorePointer"
        Option          "Device"                "/dev/psaux"
        Option          "Protocol"              "ImPS/2"
        Option          "Emulate3Buttons"      "true"
        Option          "ZAxisMapping"          "4 5"
EndSection

Section "InputDevice"
        Identifier      "USB Mouse"
        Driver          "mouse"
        Option          "SendCoreEvents"        "true"
        Option          "Device"                "/dev/input/mice"
        Option          "Protocol"              "ImPS/2"
        Option          "Emulate3Buttons"      "true"
        Option          "ZAxisMapping"          "4 5"
EndSection

Section "ServerLayout"
        Identifier      "Default Layout"
        Screen          "Screen1"
        InputDevice    "Generic Keyboard"
        InputDevice    "Touchpad"
        InputDevice    "USB Mouse"
EndSection

This will send/receive events to/from both devices.

unitcoed 06-04-2003 08:24 PM

thanks that was really helpful. Now Linux wont start up :)

-Kris

PS: is there any way I can edit XF86Config in the terminal (since the GUI won't load)

moses 06-05-2003 12:57 AM

Linux not starting and the X server or window manager not starting are two very different things, which is your problem? I can't imagine that your editing of XF86Config would have anything to do with Linux not starting.
I'm assuming you mean X won't start. You can edit XF86Config with many editors. I prefer vi, but some other options are emacs and pico.
You can also find out what the problem is by looking at the file:
/var/log/XFree86.0.log, the error will usually be at the end of the file, which you can see with the command:
Code:

tail -40 /var/log/XFree86.0.log
I'm sure the problem has to do with X not finding one or both of the pointing devices, but it's best to worry about that after we see the error message. If you post the error message, we can get both devices working. . .

laurentbon 06-05-2003 06:33 AM

If you are in runlevel 4 (the one where the X server starts automatically) an you XF86Config file is buggy, you might find yourself in that situation where you reboot and the x server starts with an error and that freezes the computer.

To repair your system, boot ut from the slack cd up to the prompt. At the prompt, you need to mount the partition hosting your slack distro.
To do that type:

# mkdir /homepart
# mount /dev/hdax /homepart

(/dev/hdax needs to be replaced by your partition device)

From there, all the files are accessible from /homepart.
Therefore, if you have a back up of your XF86Config file prior to the change that broke it, restore it:

# cd /homepart/etc/X11/
# cp XF86Config-backup XF86Config

(assuming XF86Config-backup is yout backup file)

Ar a rule of thumb, before modifying your XFree86config file, always make sure to change the runlevel to 3 (x not automatically started) in case something goes wrong. You can do that quickly by typing:

# telinit 3

Obviously, you can still start the Xserver by doing:

# startx

But if the xserver fails starting, it will shutdown and you will have the command line to keep on debugging.

THe other thing that might be helpful is to remember that doing a telinit won't change the default runlevel at next reboot. If you want to change that, you need to change the inittab in /etc.

Hope it helps..

unitcoed 06-05-2003 06:59 AM

sorry for the sarcasm on my last post, I was just a bit irritated. :)

the problem was that X window didn't load; I got a blank window (not the X window interface) that had two buttons "Yes" and "Cancel" that was followed by another blank window that had two buttons "Yes" and "cancel" and finaly an OK button.

The first time i got this screen, I canceled the first two screens and hit OK. This didn't work, Bringing me to the Terminal. I then typed # startx but that didn't work.

So i restarted my computer, and it did the same thing. (the blank windows) This time I changed the order, hitting the Yes button followed by yes, and this loaded up X window.
(confusing? yes! :confused: )

But the great thing is, now both touch-pad and the usb mouse work!!


thank you laurentbon and Moses for your replies!! :)

moses 06-05-2003 09:39 AM

Quote:

Originally posted by laurentbon
If you are in runlevel 4 (the one where the X server starts automatically) an you XF86Config file is buggy, you might find yourself in that situation where you reboot and the x server starts with an error and that freezes the computer.

If the system is set up correctly (like Slackware), one doesn't need to go through all of that to fix X, simply hit Ctrl-Alt-F6 and you can get to a command line. Having a bad XF86Config should not freeze your computer, even if it starts in runlevel 4, since X is generally smart enough to recognize that its config file is bad and doesn't lock up the system.

moses 06-05-2003 09:42 AM

Quote:

Originally posted by unitcoed
the problem was that X window didn't load; I got a blank window (not the X window interface) that had two buttons "Yes" and "Cancel" that was followed by another blank window that had two buttons "Yes" and "cancel" and finaly an OK button.

But the great thing is, now both touch-pad and the usb mouse work!!

I have never seen this behavior before (no one should ever see that behavior, as it's stupid). What window manager are you using?

I'm glad it's working for you. =-}

akaBeaVis 06-05-2003 11:16 PM

greetings, I have this same situation on my thinkpad. I have a ms wireless wheel mouse and the pointing stick working at the same time in X, if you post your X config file (should be the one ending in "-4") maybe we can fix it up for you.

One thing you've probably already thought of, but I'll verbalize anyway: Never edit your X config without backing it up first, it's so much easier to restore it and begin anew as opposed to trying to remember how it was.


One last thing about my setup: it does not yet survive a suspend/resume, at that point I have to exit X, and restart it, other than that it works nicely :)

Astro 06-11-2003 12:37 PM

Don't forget at the bottom of the XF86COnfig file to put the devices like this...

InputDevice "touchpad" "CorePointer"
InputDevice "usbmouse" "SendCoreEvents"
InputDevice "Keyboard1" "CoreKeyboard"

THis is my config for slackware, cause if I boot up without a USB mouse plugged in and I had the CorePointer the USB thing it gave an error and I couldn't use the mouse/touchpad at all.


All times are GMT -5. The time now is 06:43 PM.