LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   setup up a usb mouse (https://www.linuxquestions.org/questions/linux-newbie-8/setup-up-a-usb-mouse-284217/)

djgerbavore 01-30-2005 05:07 PM

setup up a usb mouse
 
hello,
i have two mouses. one is hooked up via PS/2 port, and that one works fine, however the usb mouse isn't working, I'm new to configuring linux systems, so i need help so i can have both mouses working at the same time....


thanks
djgerbavor3

mjrich 01-30-2005 05:12 PM

Perhaps you could post your xorg.conf file here ? It should be in /etc/X11/xorg.conf. (Or XF86Config-4, in the same directory if you can't find the xorg conf).

Cheers,

mj

djgerbavore 01-30-2005 07:10 PM

here is my XFree86Config file:
Code:

Section "ServerLayout"
Identifier    "XFree86 Configured"
Screen      0  "Screen0" 0 0
InputDevice    "Mouse0" "CorePointer"
InputDevice    "Keyboard0" "CoreKeyboard"
EndSection
 
Section "Files"
RgbPath      "/usr/X11R6/lib/X11/rgb"
ModulePath  "/usr/X11R6/lib/modules"
FontPath    "/usr/X11R6/lib/X11/fonts/misc/"
FontPath    "/usr/X11R6/lib/X11/fonts/Speedo/"
FontPath    "/usr/X11R6/lib/X11/fonts/Type1/"
FontPath    "/usr/X11R6/lib/X11/fonts/CID/"
FontPath    "/usr/X11R6/lib/X11/fonts/75dpi/"
FontPath    "/usr/X11R6/lib/X11/fonts/100dpi/"
EndSection
 
Section "Module"
Load  "glx"
Load  "record"
Load  "extmod"
Load  "dbe"
Load  "dri"
Load  "xtrap"
Load  "type1"
Load  "freetype"
Load  "speedo"
EndSection
 
Section "InputDevice"
Identifier  "Keyboard0"
Driver      "keyboard"
EndSection
 
Section "InputDevice"
Identifier  "Mouse0"
Driver      "mouse"
Option            "Protocol" "auto"
Option            "Device" "/dev/mouse"
Option      "ZAxisMapping" "4 5"
EndSection
 
Section "Monitor"
Identifier  "Monitor0"
VendorName  "Monitor Vendor"
ModelName    "Monitor Model"
EndSection
 
Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
### [arg]: arg optional
#Option    "DigitalVibrance"            # <i>
#Option    "NoFlip"                    # [<bool>]
#Option    "Dac8Bit"                    # [<bool>]
#Option    "NoLogo"                    # [<bool>]
#Option    "UBB"                        # [<bool>]
#Option    "Stereo"                    # <i>
#Option    "SWcursor"                  # [<bool>]
#Option    "HWcursor"                  # [<bool>]
#Option    "VideoKey"                  # <i>
#Option    "NvAGP"                      # <i>
#Option    "IgnoreEDID"                # [<bool>]
#Option    "NoDDC"                      # [<bool>]
#Option    "ConnectedMonitor"          # <str>
#Option    "ConnectedMonitors"          # <str>
#Option    "TVStandard"                # <str>
#Option    "TVOutFormat"                # <str>
#Option    "RenderAccel"                # [<bool>]
#Option    "CursorShadow"              # [<bool>]
#Option    "CursorShadowAlpha"          # <i>
#Option    "CursorShadowXOffset"        # <i>
#Option    "CursorShadowYOffset"        # <i>
#Option    "UseEdidFreqs"              # [<bool>]
#Option    "FlatPanelProperties"        # <str>
#Option    "TwinView"                  # [<bool>]
#Option    "TwinViewOrientation"        # <str>
#Option    "SecondMonitorHorizSync"        # <str>
#Option    "SecondMonitorVertRefresh"        # <str>
#Option    "MetaModes"                  # <str>
#Option    "UseInt10Module"            # [<bool>]
#Option    "NoTwinViewXineramaInfo"        # [<bool>]
#Option    "NoRenderExtension"          # [<bool>]
#Option    "Overlay"                    # [<bool>]
#Option    "CIOverlay"                  # [<bool>]
#Option    "ForceEmulatedOverlay"        # [<bool>]
#Option    "TransparentIndex"          # <i>
#Option    "OverlayDefaultVisual"        # [<bool>]
#Option    "NvEmulate"                  # <i>
#Option    "NoBandWidthTest"            # [<bool>]
#Option    "CustomEDID-CRT-0"          # <str>
#Option    "CustomEDID-CRT-1"          # <str>
#Option    "CustomEDID-DFP-0"          # <str>
#Option    "CustomEDID-DFP-1"          # <str>
#Option    "CustomEDID-TV-0"            # <str>
#Option    "CustomEDID-TV-1"            # <str>
#Option    "TVOverScan"                # <f>
#Option    "IgnoreDisplayDevices"        # <str>
#Option    "MultisampleCompatibility"        # [<bool>]
#Option    "RegistryDwords"            # <str>
#Option    "NoPowerConnectorCheck"        # [<bool>]
#Option    "AllowDFPStereo"            # [<bool>]
#Option    "XvMCUsesTextures"          # [<bool>]
#Option    "HorizSync"                  # <str>
#Option    "VertRefresh"                # <str>
Identifier  "Card0"
Driver      "nvidia"
VendorName  "nVidia Corporation"
BoardName  "Geforce FX5200 128 MB"
BusID      "PCI:1:0:0"
EndSection
 
Section "Screen"
Identifier "Screen0"
Device    "Card0"
Monitor    "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth    1
EndSubSection
SubSection "Display"
Depth    4
EndSubSection
SubSection "Display"
Depth    8
EndSubSection
SubSection "Display"
Depth    15
EndSubSection
SubSection "Display"
Depth    16
EndSubSection
SubSection "Display"
Depth    24
EndSubSection
EndSection

thanks,

djgerbavor3

mjrich 01-30-2005 09:45 PM

Righto -- you need to modify the file in two places. First, add the following line to the server layout section at the start, so that it becomes
Code:

Section "ServerLayout"
        Identifier    "XFree86 Configured"
        Screen 0      "Screen0" 0 0
        InputDevice    "Mouse0" "CorePointer"
        InputDevice    "Keyboard0" "CoreKeyboard"
        InputDevice    "USB Mouse" "CorePointer"
EndSection

Second, add the following section (just after the existing mouse section would be a wise idea).
Code:

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

You may need to add the SendCoreEvents line to the first mouse entry also (Mouse0, not the ServerLayout). Now restart X (logout, and then log back in - no need to reboot).

Good luck :)

mj

djgerbavore 01-31-2005 07:31 AM

first of all thanks, that work, now I have both mices working.

Now my next question - how did you know that
Code:


Option    "Device"  "/dev/input/mice"

would work for a usb mouse? what happens if i want to add another mouse, do i use hte same set up for another mouse?



thanks again,

djgerbavor3

mjrich 01-31-2005 02:35 PM

Great to hear you've got them both working :)

AFAIK, /dev/input/mice is usually used for USB devices (multiple, if you wish), as long as you have HID and mouse support enabled in the kernel - a fairly safe bet these days. The SendCoreEvents is used to allow more than one (non-USB) mouse to be used. This is common on laptops where there might be a touchpad, a tiny joystick (both usually PS2), and a USB mouse plugged in.

Cheers,

mj

djgerbavore 01-31-2005 03:21 PM

hey thanks,


so any usb mouse will be in /dev/input/mice? (granted the kernel has HID and mouse support).

thanks, you have been much help.


djgerbavor3

mjrich 01-31-2005 06:03 PM

Yes, -- as far as I know anyway.

Cheers,

mj


All times are GMT -5. The time now is 03:28 PM.