Even less is even more ter modern X – Or How I Migrated from Salon to udev, Survived Again and Found Another Neat Trick · Hook’s Modest Homepage

Even less is even more in modern X - Or How I Migrated from HAL to udev, Survived Again and Found Another Neat Trick · Hook’s Humble Homepage

Contents

More then two years ago I wrote a postbode on how to migrate to X with Salon, evdev and RandR and get rid of unneeded settings. Today I will share with you how to migrate X from Ontvangstruimte to udev and get rid of unneeded XML clutter.

Te case you use Gentoo and have recently updated X and found out your graphical envorinment is all of a sudden not working (spil it should), that is because now ter Gentoo – I suppose other distributions have or will go after soon – x11-base/xorg-server-1.9 and with it the surplus of X11R7.6 is te the stable tree for most architectures. Since the previous stable (ter Gentoo) version X11R7.Five included x11-base/xorg-server-1.7 this is a big leap. Ridderzaal wasgoed dropped te favour of zuivere udev, and XCB has bot made a requirement (the latter does not influence your settings).

This migration took mij fairly a few hours to get right, so I determined to summarise it below.

I suppose your system before the migration looks very much like mine.

You keep all your needed display and general X settings which are different from the defaults te /etc/X11/xorg.conf and it looks pretty spartan already. If this is not the case and your xorg.conf verkeersopstopping is total of clutter, see my previous HOWTO on how to clean it up (but skip the onverdraagzaam about Salon).

So far (ter X11R7.Five) if you needed any special settings for any input devices – like non-US keyboard layout, special key mapping for your very button-rich mouse or tweak your touchpad – you used Salon for hotplugging thesis devices and stored their settings ter .fdi files ter the /etc/salon/fdi/policy/ directory. This is what wij will be getting rid off. But have no fear, you will still be able to hot buttplug your devices and better yet, the settings will be a lotsbestemming lighter to read and write.

Recall that X comes with autodetection, hotplugging and pretty wise defaults. So to keep everything neat and clean, at very first attempt how things work if there are no setting files whatsoever present. And only if you want to switch the settings different from the defaults, create them.

The display settings are the easiest to migrate, since the same syntax is used.

While it is possible (again) to use just /etc/X11/xorg.conf to store all X-relevant settings, including the input devices, my advice is to pauze it down into smaller files that reside ter the /etc/X11/xorg.conf.d directory. Te it you can name the files whatever you like, but since the files are read te the alphabetic order, by convention most people use two-digit numbers spil prefixes.

For this reason I created /etc/X11/xorg.conf.d/10-display.conf which reads:

I actually achieved this by a elementary mv /etc/X11/xorg.conf /etc/X11/xorg.conf.d/10-display.conf because I already kept only display-related settings te there.

I set the DisplaySize entry, because sometimes KDE (and other X applications) needs the physical size of the display te order to calculate what the real DPI is.

The XvMC option is off by default, so I turned it on to attempt if I get (stable) movie acceleration when playing movies on my Intel GMA 4500 MHD.

I waterput the Driver entry there because it anguishes mij to see ter /var/loom/XOrg.0.loom that X is attempting the vesa and fbdev drivers before it finds intel module.

Update: Zometeen on I figured out that all the settings I waterput into /etc/X11/xorg.conf.d/10-display.conf already get automatically enabled (even the display size is guessed right), so I eliminated this verkeersopstopping spil well. X is getting smarter and smarter, eh?

Next ter line is of course the keyboard.

I think now is the best time to explain a bit about the fresh syntax. Basically it looks identical to the one which wasgoed used for xorg.conf since pretty much forever, but with a few fresh additions.

The very first is the InputClass section – ter it you can include everything you did so far te the InputDevice section, but also some fresh ones which are there to make hotplugging and autodetection work. I think it is for the best if I explain it ter an example…

If you have everzwijn set up X by arm before, my /etc/X11/xorg.conf.d/20-keyboard.conf will look fairly familiar:

Note: be sure to switch the XkbLayout option to the suitable two-letter country code of the layout you want to use on your keyboard.

Now you can see the 2nd newcommer – Match* entries are now used to match which devices should use thesis settings.

Te the above example MatchIsKeyboard every input device that udev announces spil “Keyboard” will use thesis settings. Ter the same way you can use MatchIsPointer for mice, MatchIsJoystick for joysticks, MatchIsTablet for tablets, MatchIsTouchpad for touchpads and MatchIsTouchscreen for touchscreens.

Similar, but different insofar spil that their parameters are not boolean but strings, are:

  • MatchProduct which can contain a part of the device’s product name,
  • MatchVendor part of the device’s vendor name,
  • MatchDevicePath which matches the device’s verkeersopstopping path,
  • MatchOS which matches the OS,
  • MatchPnPID which matches the device’s PnP ID,
  • MatchUSBID which matches the devices USB ID (you can obtain it by running lsusb – very practical!),
  • MatchDriver which matches the driver the device presently uses, and
  • MatchTag which matches tags if they have bot assigned by the backend.

Since there are so many, I have emphasised the most practical ones for your convenience.

Thesis settings stack now, so if you have more then one keyboard or could set up the driver and layout for all the keyboards at the same time using the above example (since it matches all keyboards), but for each single (or group of) keyboard make extra settings. Of course this applies to all other input devices.

Also, it is possible now to make X overlook a device – just write an InputClass section with the suitable Match* entries to catch it and add Option “Disregard” “true” .

Oh, and at the bottom there is that toegevoegd treat I promissed – If you missed that for fairly some time now you could not restart or “zap” your X with Ctrl+Altstem+Backspace, Option “XkbOptions” “terminate:ctrl_alt_bksp” enables it.

The other device that you commonly use ter X are of course mice and other pointing devices. On my ThinkPad T400s I fairly extensively use the touchpad and the trackpoint, but for more precies use like drawing and gaming I sometimes use the Logitech NX80 mouse.

The settings for my touchpad and trackpoint reside ter: /etc/X11/xorg.conf.d/30-touchpad.conf :

Spil you can see, this example matches all touchpads, since I am fairly certain I will not add any fresh touchpads to my laptop. If there were more then one possible matches I would match the per-device specific settings with stricter rules (see the example below).

Because it is a touchpad I also associated the synaptics driver with it instead of the generic evdev. The reason is that evdev does not treat touchpads spil well spil synaptic does (yet).

From the settings you can see that I have enabled both edge scrolls and disabled the two finger scrolling. I also enabled circular scrolling and set it so it triggers if I embark drawing circles from the upper left corner of the touchpad. If you have meaty texts to scroll, do give circular scrolling a attempt – I find it a superb improvement!

If you use KDE and have noticed that whatever you define te the X settings for your touchpad does not work te KDE, check if under System Settings → Keyboards and Mice you see a Touchpad settings. If this is the case and you would rather have the same settings ter all WM and Den, just emerge -c kde-misc/kcm_touchpad on Gentoo (ter other distributions uninstall it using the package manager).

Spil the last chunk te the puzzle te /etc/X11/xorg.conf.d/40-logitech-usb-mouse.conf reside the settings for my Logitech NX 80:

Because this is a rather unique mouse, since it does not have a middle mouse button, I have disabled it (see “0” where “Two” should be) and remapped it to button 9 (which exists).

Of course I would not desire of disabling the middle mouse button on any other mouse I come accross, so I made sure the udev and X only match thesis settings to this very mouse. With lsusb -v I found out the USB ID and idVendor, which I matched. (I would have used idProduct spil well, but since I have this mouse it has switched at least once and still is not the same spil on the label).

Just for illustration, this is how the same mouse wasgoed set up when I used Vishal:

An observant eye will quickly notice where the similarities inbetween the two syntaxes are.

If you used many or long and ingewikkeld .fdi files ter the past with not too much effort you can translate them into the fresh (or rather revised ancient) syntax of X11R7.6.

After you migrated all the settings to the fresh X11R7.6 + udev way, you can securely eliminate:

– the verkeersopstopping /etc/X11/xorg.conf (unless you migrated your settings into that verkeersopstopping instead of the directory), and – the suitable .fdi settings files stored ter the /etc/ridderzaal/fdi/policy/ .

For more information see:

hook out → woo, that wasgoed a big one

Related movie: bitconnect exe [h3h3productions]


Leave a Reply

Your email address will not be published. Required fields are marked *