This blog is NOFOLLOW Free!

Archive for 'international Linux'

Debian Chinese How-To

Debian Chinese How-To
By Yien Bin

This is my personal experience with chinese environment setup on my Debian Box, with KDE desktop.

Here is my specs.

  • Debian Unstable, kernel 2.6.18-1-686
  • xserver-xorg 7.1.0-4
  • kde 3.5.5

50px-Debian-OpenLogo.svgSetting your system with english locales, so that your desktop, menus and programs’ file menus won’t show english characters in blurry chinese ttf fonts. You will still have the ability to input chinese in almost everything(browsers, konquerer, instant messengers, konsole, xchat and more).
Here is a step by step instruction.

  1. Setting UTF-8 Locale system wide

    dpkg-reconfigure locales

    This command will prompt you a screen to select your desired locales. For my case, I have selected

    1. en_US ISO-8859-1
    2. en_US.UTF-8 UTF-8
    3. zh_CN GB2312
    4. zh_CN.GB18030 GB18030
    5. zh_CN.GB18030 GB18030
    6. zh_CN.GB18030 GB18030
    7. zh_TW BIG5
    8. zh_TW.UTF-8 UTF-8

    Set en_US.UTF-8 UTF-8 as default locales. By now, when you output your locales settings with locale command, all the variables with “LC_XXX” shoud be already in “en_US.UTF-8“.

    65px-Zhongwen.svg

  2. Displaying Chinese

    There are a few packages you need to get in order to get chinese text displayed correctly in your KDE desktop.
    These are for KDE Internationalization.

    • kde-i18n-zhcn (for Simplified Chinese)
    • kde-i18n-zhtw (for Big5 Chinese)

    You can always add your desired encoding for other languages. I have also kde-i18n-ko for korean, and kde-i18n-ja for Japan.
    After installing the internationalized packages, you will have to install TTF(true type fonts). Here’s the list.

    • ttf-arphic-bkai00mp (“AR PL KaitiM Big5″ Chinese TrueType font)
    • ttf-arphic-bsmi00lp (“AR PL Mingti2L Big5″ Chinese TrueType font)
    • ttf-arphic-gbsn00lp (“AR PL SungtiL GB” Chinese TrueType font)
    • ttf-arphic-gkai00mp (“AR PL KaitiM GB” Chinese TrueType font)
    • ttf-arphic-uming (“AR PL ShanHeiSun Uni” Chinese Unicode TrueType font)
    • ttf-fireflysung (“AR PL New Sung” Chinese TrueType font)
    • ttf-kochi-gothic-naga10 (Kochi Subst Gothic Japanese TrueType font)

    My default chinese font is ttf-fireflysung which I’ve forgot where to get. I remember getting it from a Taiwan site, if any of you have the address, please kindly let me know. If you are unable to get firefly, uming is probably your best choice for chinese text.

  3. Changing font for chinese text display

    Sometimes in your KDE desktop, if you have downloaded files with chinese/japanese file names, it will be displayed in square unreadable characters. This means KDE is unable to find appropriate font substitution for unknown characters. You can get qt3-qtconfig to deal with this problem. Inside the program you will get to set font substitution for your default KDE font(mine is Bitstream Vera). Apply several substitution TTFs like AR PL New Sung and AR PL ShanHeiSun Uni, so your text will be displayed correctly.

    For other programs like Firefox, Xchat, amarok and more. You will get to choose their own default font. For my case, once qt3-qtconfig is set properly, these programs have no problem using the settings.

    If above methods still do not work out for you. You can try also install gtk2-engines-gtk-qt. This program will use your Qt settings to draw your GTK applications’ user interface, including the fonts of course. You should also check with

    update-alternatives –config qtconfig

    to see whether which qt config is currently in use. If you have used qt3-qtconfig, you definitely should choose “/usr/bin/qtconfig-qt3″ as your default.

  4. Chinese Input Method

    IMO, scim is always the best choice because it has pinyin support, the only chinese input method I’m familiar with. You will have to get these packages.

    • scim
    • scim-chinese
    • scim-gtk2-immodule
    • scim-modules-socket
    • scim-pinyin
    • libscim8c2a

    In order to get scim to work in almost everywhere in KDE, some settings need to be done.
    First, in your ~/.bashrc file, add in this line.

    export LC_CTYPE=”zh_CN.UTF-8″

    This will export your LC_TYPE as zh_CN.UTF-8 since we have already set all these to en_US.UTF-8. This is per user’s local setting, for my case I’ve set my LC_TYPE to zh_CN.UTF-8 system wide, with this command.

    dpkg-reconfigure localesconf

    Use this command to set scim as your default input method for X.

    update-alternatives –config xinput-all_ALL

    Again this is my system wide setting. For user’s local setting, add these lines in your ~/.bashrc

    export XIM=SCIM
    export XIM_PROGRAM=/usr/bin/scim
    export XIM_ARGS=”-d”
    export GTK_IM_MODULE=xim
    export QT_IM_MODULE=xim

    Restart your X-server, and login to KDE. In any text input field(Gaim, Firefox, Xchat, Open Office, Thunderbird and more), when you hit CTRL+Space, the scim toolbar will pop up and you are able to input chinese text. CTRL+Space again to switch back to English.

    Remember not to install the Skim(KDE frontend for scim), as it will somehow freeze your keyboard frequently.

A very useful page at http://www.unifont.org/fontguide/, you might want to check it out.

Yien Bin is a part-time tech blogger. Debian is his favorite operating system. His blog can be found at http://www.nixser.com

Tags: , ,

Recientemente mi hija viejo Pentium III portátil Compaq completamente muerto. Esto ocurrió cerca de la Navidad para que su lista de regalos fue fácil. El problema era que yo no quería gastar mucho dinero. El otro problema era que yo odiaba tener un ordenador.

Lo odiaba porque siempre había que trabajar en él. Se utilizó la computadora para hacer las tareas, la mensajería 15instantánea y navegación. Cada par de meses, me encontré la eliminación de basura espía y otro de la computadora. En ocasiones es más fácil sólo para reconstruir el equipo al volver a instalar todo el software, incluyendo el sistema operativo. El seguimiento de su uso de Internet a través de mi router, así que sé que ella no ha sido la de “cuestionables” sitios, pero estas cosas sigan abriéndose camino en su ordenador.

Decidí estudiar algo que nunca antes habían considerado. LINUX! Cogí otro Pentium III (este fue un poco más fuerte que su computadora portátil de edad) de escritorio por menos de $ 100.00. He añadido algo de memoria de edad que había sentado en un estante. He descargado SUSE Linux y se fue a trabajar.

Me ha sorprendido gratamente la forma en que la instalación ha sido fácil! Hubo muy poca interacción y mis opciones eran muy simples. En unos 30 minutos, tuve un equipo de trabajo conectada a la Internet.

Hay algunas cosas con las que yo estaba muy contento. Se ejecuta muy bien con el hardware antiguo. Si hubiera empleado de Windows XP que se han visto obligados a obtener una nueva computadora y gastar cientos de dólares. El sistema operativo viene con un navegador (Firefox) y el software de oficina completa (OpenOffice – que es compatible con los productos de Microsoft Office). Hubo también un momento muy agradable herramienta de mensajería que le permite usar muchos diferentes clientes de mensajería instantánea en una sola pieza de software. Se había extracción de CD y software de grabación, así como varios programas de audio. Además de eso, el sistema operativo y todos los programas eran libres!

Ahora sé que la mayoría de la gente que lee esto está pensando, “Ok, tenemos otro tipo de lucha contra Microsoft aquí”. Eso es absolutamente falso. Yo soy un desarrollador web de Windows y por el comercio y el uso de productos de Microsoft exclusivamente (salvo para el uso de Firefox como navegador cuando las pruebas). Yo soy un gran creyente de los productos que Microsoft produce simplemente porque el trabajo y en la mayoría de los casos funcionan muy bien juntos.

Lo mejor de este cambio de sistema operativo es que la computadora de mi hija está libre de spyware y no es objetivo de la mayoría de los virus. El hecho es que la mayoría de virus y spyware dirigidas a Microsoft Windows. Ahora puedo dormir tranquilo sabiendo que no voy a ser la reconstrucción de un equipo cada pocos meses.

Aaron Davis es un desarrollador de software Hna. Él ha sido un web / desarrollador de la aplicación de más de 12 años y ha servido a la industria de TI de más de 15 años. Su especialidad es. NET con C # y SQL Server. Aaron ha dedicado su nueva página web para proporcionar un foro para desarrolladores de software para expresar sus preocupaciones acerca de las caídas de las prácticas de desarrollo empresarial de software.

Tags: , , ,
Back to top