random findings by wt8008
RSS icon Home icon
  • Tomato Firmware Hostname

    Posted on July 29th, 2009 wt8008 No comments

    I always wanted to access my router via its hostname instead of typing the router IP in. This works fine in Linux, but for some reason Windows resolves hostnames different. I checked in windows with nslookup, and it can resolve my router name, but in Firefox or IE it doesn’t work. I had the same problem when using dd-wrt.

    In the Basic->Identification section, I randomly added a domain name of home, and now windows can resolve the router hostname and router.home, also points to my router. For past routers I used, I typically leave this field empty, as the documentation says it is provided by my ISP. This solution doesn’t require massive editing of config files on the router or editing host files.

    The computers can resolve themselves just fine either via the router DNS, Samba, or Avahi. I am not sure which one is doing the work.

  • Chinese Characters in Flash

    Posted on July 17th, 2009 wt8008 No comments

    With flash, Chinese (font) characters show up as boxes instead of the character itself. To remedy the issue

     $ sudo rm /etc/fonts/conf.d/69-language-selector-zh-cn.conf

    I don’t like the shipped configuration default for Ubuntu CN anymore. Don’t worry this is only removing a symbolic link.

    Create a new file /etc/fonts/conf.d/63-wqy-zenhei.conf and populate it with

    <?xml version="1.0"?>
    <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
    <fontconfig>
    <alias>
    <family>sans-serif</family>
    <prefer>
    <family>WenQuanYi Zen Hei</family>
    </prefer>
    </alias>
    <alias>
    <family>monospace</family>
    <prefer>
    <family>WenQuanYi Zen Hei</family>
    </prefer>
    </alias>
    </fontconfig>

    This files adds the WenQuanYi Zen Hei font to the sans-serif and monospace font families.

    Next, in the 30-cjk-aliases.conf file accept the WenQuanYi Zen Hei font as acceptable mappings to Windows fonts such as SimSum and MingLiu. Make sure that the font is first, as the system will pick the font by ordering. A sample snippet of affected areas

    <!-- Aliases for Simplified Chinese Windows fonts -->
    <alias>
    <family>SimSun</family>
    <family>NSimSun</family>
    <family>SimSun-18030</family>
    <family>NSimSun-18030</family>
    <family>宋体</family>
    <family>AR MingtiM GB</family>
    <accept><family>WenQuanYi Zen Hei</family></accept>
    <accept><family>AR PL UMing CN</family></accept>
    <accept><family>AR PL ShanHeiSun Uni</family></accept>
    </alias>
    <!-- Aliases for Traditional Chinese Windows fonts -->
    <alias>
    <family>MingLiU</family>
    <family>細明體</family>
    <family>PMingLiU</family>
    <family>新細明體</family>
    <family>AR MingtiM BIG-5</family>
    <accept><family>WenQuanYi Zen Hei</family></accept>
    <accept><family>AR PL UMing TW</family></accept>
    <accept><family>AR PL ShanHeiSun Uni</family></accept>
    </alias>
    <alias>
    <family>標楷體</family>
    <accept><family>WenQuanYi Zen Hei</family></accept>
    <accept><family>AR PL UKai TW</family></accept>
    <accept><family>AR PL ZenKai Uni</family></accept>
    </alias>
    <!-- Alias for HKSCS -->
    <alias>
    <family>Ming (for ISO10646)</family>
    <accept><family>WenQuanYi Zen Hei</family></accept>
    <accept><family>AR PL UMing HK</family></accept>
    <accept><family>AR PL ShanHeiSun Uni</family></accept>
    </alias>

    Now, Chinese charaters in font work correctly without editing 49-sansserif.conf to map unknown fonts to sans instead of sans-serif. The solution which others have suggested created an issue with the font of a buddy on pidgin.