Linux Device Configuration-mouse Configuration

Source: Internet
Author: User

LinuxThe configuration process of a device is to use this information to configure the driver and working method of the device after detecting the device type and current working parameters of the device, for device detection process, see how to implement automatic hardware detection in Linux). To complete such a task, you need to do the following:

First, a detailed device information file is required, which describes the device ID, the device driver corresponding to the device ID, and the device configuration parameter device options) detailed descriptions of device settings, device configuration methods, aliases of devices, and the number of the primary devices.

The second is to set the configuration script file corresponding to the device according to the device type and the configuration script files of the same device for different linux versions installed.

Configure mouse

1. Basic mouse information

Linux supports four different bus mouse hardware interfaces: InportMicrosoft), Logitech, PS/2, and ATI-XL. The 2.4 kernel also supports the IBM PC110 digital board and Apple Desktop mouse.

* Inport mice

Inport mice contains most old Microsoft mouse types. Inport mice is usually connected to the interface card of the motherboard. If the mouse wire connector is round and has 9 needles, it may be Inport mice.

* Logitech mice

* PS/2 mice

* ATI combo video/mice

* IBM PC110 palmtop digitizer

* Apple Desktop Mouse

* Hybrid Mice

For the mouse protocol, most bus mice use the BusMouse protocol. Some ancient Logitech mice use the MouseSystems protocol, while some older Microsoft mice use the Logitech protocol. The PS/2 mouse always uses the PS/2 protocol.

Device Files corresponding to different types of Mouse:

Number of the primary device of the Interface Type Device

Logitech/dev/logibm 10 0

PS/2/dev/psaux 10 1

Inport/dev/inportbm 10 2

ATI-XL/dev/atibm 10 3

USB mouse/dev/input/mice 13 63

Command to create the corresponding device:

Mknod/dev/logimm c 10 0

Mknod/dev/psaux c 10 1

Mknod/dev/inportbm c 10 2

Mknod/dev/atibm c 10 3

Mknod/dev/input/mice c 13 63

After the device file corresponding to the mouse is created, many programs now use/dev/mouse as the default device file, to make the mouse work properly, you need to create a symbolic connection/dev/mouse pointing to the real mouse device file. For example, for the ps/2 mouse,/dev/mouse points to/dev/psaux, for the usb mouse,/dev/mouse/points to/dev/input/mice, for serial mouse/dev/mouse pointing to/dev/ttyS0. These files may be different for different linux Release versions. The above introduction is mainly based on the Redhat release configuration.

For the three most common mouse types: Serial mouse, PS/2 mouse, and USB mouse, the support for PS/2 mouse is usually in the kernel, therefore, you do not need to insert a device module before the mouse operation. However, for the other two types of mouse, the insert module operation is generally required. For serial mouse, you must first insert module serial. o,

/Sbin/modprobe serial

After a module is successfully inserted, if the serial port mouse supports the plug-and-play serial port protocol, you can read the mouse type information from the serial port/dev/ttyS *), and then the resulting information is displayed, complete the configuration file with the mouse. To make the USB mouse work properly, you must first Insert the module USB mouse. o and mousedev. o

/Sbin/modprobe usbmouse

/Sbin/modprobe mousedev

Similarly, to enable the mouse driver to automatically load, you also need to create a usb-interfaceusb-controller) alias in the/etc/modules. conf file.

2. Mouse configuration file

The correct mouse configuration must generate the configuration file/etc/sysconfig/mouse, which includes the following options: MOUSETYPE, XMOUSETYPE, FULLNAME, XEMU3, and DEVICE. The mouse configuration file is also the basis of the mouse configuration section in the X configuration file. Without this file, many X configuration programs will not work.

MOUSETYPE =

Configure the mouse type, including ps/2, Busmouse, imps2, netmouse, Microsoft, Logitech, MouseMan, MMHitTab, MouseSystems, pnp, logim, ms3, and MMSeries.

XMOUSETYPE =

The mouse types configured in the X system, including MouseMan, IntelliMouse, MMSeries, MMHittab, Logitech, MouseMan, Microsoft, MouseSystems, PS/2, and BusMouse.

FULLNAME =

The full name of the mouse device. For example, for a common PS/2 mouse, its full name is PS/2 | Standard.

XEMU3 =

Whether to simulate a three-Key mouse. The optional parameter is yes or no.

DEVICE =

The device file corresponding to the mouse. For example. For a common PS/2 mouse, the device file is psaux.

3. Mouse configuration skills

With gpm, you can use the mouse in command line mode. In this way, you can use the mouse to perform operations such as cutting and pasting on the console. For example, for the ps/2 mouse, the configuration method is:

Gpm-t ps/2-m/dev/psaux

If the-m option is not specified, the system searches for the file/dev/mouse.

Irregular mouse movement may be caused by incorrect mouse settings. For example, Logitech uses the Microsoft MouseMan protocol instead of the Logitech protocol ). If your mouse moves irregularly, you may first need to replace the value specified by MouseTypeXMouseType.

In system X, if you need to change the left and right mouse buttons, you can execute xmodmap-e "pointer = 3 2 1 ".

After reading the above, you can configure the mouse in Linux. I hope it will help you.

  1. Three ways to change the background color of a DIV when the mouse passes
  2. CSS allows you to hover over the tip
  3. 7.4.7 mouse-related -- MouseDown/MouseMove/MouseUp event
  4. Scalable Web Services in Linux server cluster system
  5. Linux Kernel
  6. Three types of Linux system logs
  7. Modify the resource core of an independent kernel and dual core of an embedded Linux System

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.