Gentoo-WiKi

본문 바로가기
사이트 내 전체검색


Gentoo Linux >> System Administration for Gentoo Linux
[목차]
제3장 System Administration

    4. USB 마우스 사용하기


  usb 마우스를 사용하기 위해서는 커널에서부터 인식을 시켜줘야 하므로 커널 컴파일을 다시 해야 합니다. 아래 옵션을 확인한 후 커널을 컴파일 하시기 바랍니다.

# make menuconfig

 

Device Drivers  --->

Input device support  --->

<M>   Mouse interface

[*]   Mouse  --->

<*>   PS/2 mouse

[*]   Miscellaneous devices  --->

<M>   User level driver support

      Hardware I/O ports  --->

<*>   PCI PS/2 keyboard and PS/2 mouse controller

 

USB support  --->

<M>   EHCI HCD (USB 2.0) support

<M>   OHCI HCD support

<M>   UHCI HCD (most Intel and VIA) support

<M> USB Human Interface Device (full HID) support

[*]   HID input layer support

[*]   /dev/hiddev raw HID device support

      USB HID Boot Protocol drivers  --->

<M> USB HIDBP Keyboard (simple Boot) support

<M> USB HIDBP Mouse (simple Boot) support

  [User level driver support]을 선택해야 위의 Mouse interface가 선택이 가능하고 mousedev 모듈이 생성됩니다.

  커널을 다시 컴파일 합니다.

# make && make modules && make modules_install && make install


  모듈이 실행되는 목록을 확인하면 다음과 같습니다.

# lsmod

Module               Size   Used by

uhci_hcd             30840  -

mousedev            9928   -

ehci_hcd             29008  -

usbhid               35744  -

usbmouse            4360   -

ohci_hcd             18828  -


  X윈도우상에서 마우스를 사용하기위해 /etc/X11/xorg.conf파일을 수정합니다.

# vi /etc/X11/xorg.conf

... 생략

Section "InputDevice"

    Identifier  "Mouse0"

    Driver      "mouse"

    Option "Protocol"    "IMPS/2"

    Option "Device"      "/dev/psaux"

    Option "ZAxisMapping"      "4 5"

EndSection

 

Section "InputDevice"

    Identifier  "Mouse1"

    Driver      "mouse"

    Option "Protocol"    "IMPS/2"

    Option "Device"      "/dev/input/mouse0"

    Option "ZAxisMapping"      "4 5"

EndSection

... 생략

Section "ServerLayout"

... 생략

    InputDevice "Mouse0" "CorePointer"

    InputDevice "Mouse1" "SendCoreEvents"

    InputDevice "Keyboard1" "CoreKeyboard"

... 생략

EndSection


  기존 PS/2 마우스를 같이 사용할 경우 Identifier "Mouse1"은 USB 마우스를 설정하고, Identifier "Mouse0"은 PS/2 마우스를 설정하면 됩니다.


  USB 디바이스가 생성이 되지 않아 오류가 나타날 수 도 있습니다. MAKEDEV 명령을 이용하여 생성합니다.

# cd /dev

# ls usb                  [ 목록에 나타나지 않을 경우]

# MAKEDEV usb

 

# ls input                [ 목록에 나타나지 않을 경우]

# MAKEDEV input


  /dev/input/mice는 USB 마우스 전체를 대표하는 장치이고, /dev/input/mouse*는 USB 마우스 하나하나의 장치입니다. 필요하다면 원하는 만큼 수동으로 만들 수도 있습니다.


  재부팅후 X윈도우를 실행하면 마우스 사용이 가능하게 됩니다.

[목차]

개인정보취급방침 서비스이용약관 모바일 버전으로 보기 상단으로

TEL. 063-469-4551 FAX. 063-469-4560 전북 군산시 대학로 558
군산대학교 컴퓨터정보공학과

Copyright © www.leelab.co.kr. All rights reserved.