Pages

Tuesday, August 24, 2010

Slackware 13.1 woes

Slackware, why have thou forsaken me?

At home:

The upgrade from 13.0 to 13.1 killed my /dev/sdX where / is mounted, apparently 13.1 has no love for reiserfs anymore. (On the other hand, my hard drive might be showing symptoms due to its age)

I hope it's nothing serious. Gotta fix it fast though.

At work:

Xorg on 13.1 does not like me changing keyboard settings from hal, after I done the following:

cp /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi /etc/hal/fdi/policy/
nano -w /etc/hal/fdi/policy/

Before:
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.keymap">
      <append key="info.callouts.add" type="strlist">hal-setup-keymap</append>
    </match>
    <match key="info.capabilities" contains="input.keys">
      <!-- Restore Ctrl-Alt-Bksp Xserver Zapping -->
      <!--<merge key="input.xkb.options" type="string">terminate:ctrl_alt_bksp</merge>-->

      <!-- Edit (as needed) these four lines in the copied fdi file -->
      <merge key="input.xkb.rules" type="string">base</merge>
      <merge key="input.xkb.model" type="string">evdev</merge>
      <merge key="input.xkb.layout" type="string">us</merge>
      <merge key="input.xkb.variant" type="string"/>
    </match>
  </device>
</deviceinfo>


After:
<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
  <device>
    <match key="info.capabilities" contains="input.keymap">
      <append key="info.callouts.add" type="strlist">hal-setup-keymap</append>
    </match>
    <match key="info.capabilities" contains="input.keys">
      <!-- Restore Ctrl-Alt-Bksp Xserver Zapping -->
      <!--<merge key="input.xkb.options" type="string">terminate:ctrl_alt_bksp</merge>-->

      <!-- Edit (as needed) these four lines in the copied fdi file -->
      <merge key="input.xkb.rules" type="string">base</merge>
      <merge key="input.xkb.model" type="string">evdev</merge>
      <merge key="input.xkb.layout" type="string">us</merge>
      <merge key="input.xkb.variant" type="string">dvorak</merge>
    </match>
  </device>
</deviceinfo>


Although I like the zero-configuration philosophy behind it; that's why I refuse to set it through the traditional /etc/x11/xorg.conf.

Hald should be deprecated for udev really. The XML overhead is stupid if you can adapt things to your needs through command-line like this:

In $HOME/.bashrc add:

alias aoeu="setxkbmap -model evdev -layout dvorak -variant intl -option grp:win_switch"

Or if you have an EZ-Reach (tm) Typematrix 2030 keyboard like me, you can add this to your /etc/udev/rules.d/99-custom.rules:

SYSFS{idVendor}=="1234", SYSFS{idProduct}=="5678", MODE="660", SYMLINK+="input/typematrix%k", GROUP="plugdev", RUN+="setxkbmap -model evdev -layout dvorak -variant intl -option grp:win_switch ; loadkeys dvorak"

Run the lsusb command to get the idVendor and idProduct values, my lsusb output goes something like this:

...
Bus 004 Device 002: ID 047d:1020 Kensington Expert Mouse Trackball
...

If you own a  Kensington expert trackball (mouse) like me, then you'll probably want to borrow my fdi definition, in the following block of xml code:

<?qxml version='1.0' encoding='UTF-8'?>
<deviceinfo version='0.2'>
  <device>
    <match key='info.capabilities' contains='input.mouse'>
      <merge key='input.x11_driver' type='string'>mouse</merge>
      <merge key="input.x11_options.Device" type="string">/dev/ttyS0</merge>
      <merge key="input.x11_options.Protocol" type="string">ThinkingMouse</merge>
      <merge key="input.x11_options.Emulate3Buttons" type="string">false</merge>
      <merge key="input.x11_options.CorePointer" type="string">On</merge>
      <merge key="input.x11_options.Buttons" type="string">4</merge>
      <merge key="input.x11_options.ButtonMapping" type="string">1 2 3 4</merge>
    </match>
  </device>
</deviceinfo>

End rant.

Once you go slack, you never go back.

No comments:

Post a Comment

Please help to keep this blog clean. Don't litter with spam.