Pages

Showing posts with label xorg. Show all posts
Showing posts with label xorg. Show all posts

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.

Monday, May 24, 2010

Wine, winetricks and naughty fonts

When using wine and winetricks, winetrick might complain about samyak and oriya fonts; being naughty non-conformistic naughty fonts and so on.

Apparently, these are included in a bunch of linux distros.

In slackware 13.1 they are included in the package: "ttf-indic-fonts-0.4.7.4-noarch-...".

Just grep oriya in /var/log/packages/ if you don't believe me:

grep -nr oriya /var/log/packages ; xlsfonts 2>/dev/null | egrep -i "samyak|oriya"

Once you've blown the package away, you will find that winetricks will keep on complaining, about those fonts. This is due to "xlsfonts"; this binary is a part of Xorg to show all of your fonts. Run it, to see it for yourself.

I turned off this check in winetricks, by commenting off the code, but somehow the installation of .NET 1 to 3 kept crashing on me. Evidently that check is there for a good reason.

A quick google search reveals that xlsfonts reads its input from /etc/fonts. (edit: This is false. I still have no idea where xorg gets the idea samyak is on my system.)

I crafted a silly little sed command to try to remove it like this:

grep -nr riya . | sed 's@\(Lohit Oriya\)@<!--\1-->@'

Then I committed the changes to the files. Notice the parameter "-i".

sed -i 's@\(Lohit Oriya\)@<!--\1-->@' /etc/fonts/conf.avail/65-nonlatin.conf


Alas, that was a mistake. Since, samyak was found not oriya. Anyway, no harm done. Just uncommented some xml file. This can be easily undone, by firing up an editor and removing it by hand.

That'll teach me to want to use .NET instead of mono.

Argh. Dead end. How do I remove samyak from the system completely?!

Update 20-07-2010:  This is still broken in wine 1.2 with the winetricks from winehq.org. It still prematurely finds the offending samyak. Although .NET 1 through 3 can all install now. You can uncomment the lines in winetrick though to prevent the nagscreen; but you're on your own from there on.