Gentoo Archives: gentoo-user

From: walt <w41ter@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] [EXAMPLE] Configuring xorg without hal
Date: Mon, 27 Dec 2010 14:05:46
Message-Id: ifa6bn$i2s$
1 I just fumbled my way through converting my old hal mouse configuration
2 to the "new" way of putting it back in xorg.conf (where it belongs :)
4 Peter Hutterer gave me a link to his blog, which was very helpful:
8 Turns out that the xorg-server-1.9.x defaults work okay with my cheap
9 M$ optical wheel-mouse, but not with my expensive trackball mouse without
10 a wheel.
12 When hal first came along I added a custom .fdi file for the trackball
13 by adapting the settings I formerly put in the InputDevice section in
14 my old xorg.conf (where it should have stayed).
16 Now that hal has gone, I've adapted the hal settings, with help from
17 Peter's blog, back to xorg.conf but with some important adjustments.
19 Here is my original (pre-hal) mouse config from xorg.conf:
21 Section "InputDevice"
22 Identifier "Mouse0"
23 Driver "mouse" <----- note the old driver
24 Option "Protocol" "auto" <--- this is now redundant
25 Option "Device" "/dev/input/mice" <--- now redundant
26 Option "Emulate3Buttons"
27 Option "EmulateWheel" <----- because I have no wheel
28 Option "EmulateWheelButton" "8" <---- new default is "4"
29 EndSection
31 My new (post-hal) version:
33 Section "InputClass" <----- note the new word "Class", not "Device"
34 Identifier "trackball" <----- can be anything you want
35 MatchProduct "ImExPS" <-----*new*. Matches the product name!
36 # Driver "evdev" <--- this is redundant so I removed it.
37 Option "AutoServerLayout" "on" <--- see Peter's blog
38 Option "Emulate3Buttons" "on"
39 Option "EmulateWheel" "on"
40 Option "EmulateWheelButton" "8" <--- change the default
41 EndSection
43 If you have no InputDevice sections (many people no longer need them)
44 then "evdev" will automatically discover and configure your keyboard
45 and mouse without being asked, applying the xorg-server defaults.
46 (That's why I deleted the Driver "evedev" from my config.)
48 Only if the defaults are wrong for your machine do you need to change
49 them using the stuff I outlined above.
51 At first I tried using the old "mouse" driver in the old way, but it
52 seems to fight with "evdev" over who's in charge and between the two
53 of them I got error messages galore and the mouse didn't work right.
55 The nice thing about the new "InputClass" thing is that you can have
56 as many such sections as you want, each one being specific for an
57 individual mouse or keyboard -- note the "MatchProduct" keyword
58 picks out my trackball mouse specifically and doesn't prevent me from
59 using my simpler wheelmouse if I want to, where the default settings
60 would 'just work'.
62 Enough for now.


Subject Author
[gentoo-user] Re: [EXAMPLE] Configuring xorg without hal walt <w41ter@×××××.com>