Knoppix/Debian - xcin (Chinese input)

Good day.

Does anyone know of a simple way to outfit Knoppix 3.6 (Debian) with Big5 Chinese text input and a Big5/Taiwan locale?

I’ve just re-formatted my hard drive and then converted my entire system to a Linux-only environment through a quick and simple Knoppix HD installation (I tried both Red Hat and Mandrake, but the disks - professionally produced - had errors). (I highly recommend it.)

The problems I’m having are trying to gain the ability to input Chinese text and trying to install a Big5/Taiwan locale. I can’t seem to get them to work. (It’s probably because I’m still very green.)

I bought a Taiwanese distribution of Knoppix (BV1AL), but the interface is just too ugly and clumsy-looking for my liking.

This is a very handy site on Xcin Project:

xcin.linux.org.tw/

However, its documents are filled with Linux-speak. Also, every time I install a component (or try to), I’m hit with a different dependency problem since the Big5 “environment” isn’t part of the Knoppix distribution.

Any pointers from any pros out there?

Are there any other tools to do this?

Many thanks…

I just read the docs, and :astonished: I see what you mean. They don’t list any Debian packages, just instructions for installing from the source code – including editing the makefile and compiling everything.

Fortunately, Knoppix is based on Debian, but unfortunately, it might not be up to the current release, depending on which version you got.

How much of a nerd are you? Done any compiling? Going to the happy hour tomorr…er, tonight? (It being well after midnight already.)

[quote=“jwar”]Good day.
Does anyone know of a simple way to outfit Knoppix 3.6 (Debian) with Big5 Chinese text input and a Big5/Taiwan locale?
[/quote]

Have you got Knoppix already installed to the hard drive? If so, it’s not too difficult. I’m using Kanotix myself, which is very similar (also Debian-based), but bear in mind that Kanotix runs Debian unstable - not sure if latest Knoppix is running testing or unstable, which can make a difference.

That caveat aside, the procedure:

  1. dpkg-reconfigure locales

Click all the locales that start with “zh_TW” and “zh_CN”

For your default locale, you’ll probably want “us_en”

  1. Install the following with “apt-get install” (note: some of it may already be installed):

xcin
libc6
libdb3
libtabe2
xlibs
locales
libtabe-db
xfonts-base
xfonts-intl-chinese
xbase-clients
x-ttcidfont-conf
ttf-arphic-bsmi00lp
ttf-arphic-bkai00mp
ttf-arphic-gbsn00lp
ttf-arphic-gkai00mp
xfonts-cmex-big5p
rxvt-ml

  1. You’ll have to restart Knoppix. Then open a console and start Xcin either for BIG5 or GB:

xcinterm-big5
or
xcinterm-gb

You’ll have to play around a bit with the ctrl-shift, ctrl-space and shift-space to see how the input methods work.

You cut & paste Chinese text into any application by highlighting it with the mouse and then using the mouse middle button (or scroll wheel if you don’t have a middle button) to paste.

Start your browser (Mozilla) from the same console where you started Xcin. You should be able to cut & paste Chinese into it.

regards,
Robert

Robert,

A sincere thank you for the above post. (Special public thanks to MaPo Squid for assistance and darn interesting conversation.) It’s great.

Everything is up and almost running.

Almost.

After reconfiguring the locales and re-generating them, my version of Knoppix (3.6; Linux kernel 2.6) failes to recognize and incorporate the new locales and their languages. (Should it be doing that from the “Control Center>>Regional and Accessibility” area after restarting?)

Also, when I run an rxvt (xcin, zh_TW.Big5) window, I’m greeted with “warning: invalid font BIG5-0” and “error: fontset setting error”.

Sorry for the pestering. I’m merely a 3-week-old Linux-ite.

[quote=“jwar”]Robert,

A sincere thank you for the above post. (Special public thanks to MaPo Squid for assistance and darn interesting conversation.) It’s great.

Everything is up and almost running.

Almost.

After reconfiguring the locales and re-generating them, my version of Knoppix (3.6; Linux kernel 2.6) failes to recognize and incorporate the new locales and their languages. (Should it be doing that from the “Control Center>>Regional and Accessibility” area after restarting?)

Also, when I run an rxvt (xcin, zh_TW.Big5) window, I’m greeted with “warning: invalid font BIG5-0” and “error: fontset setting error”.

Sorry for the pestering. I’m merely a 3-week-old Linux-ite.[/quote]

Hmmm…I haven’t seen that error. I don’t think it has anything to do with the “Control Center” - I’m not even using KDE, so I don’t have a Control Center. A reboot is necessary after installing the new locales, but I assume you did that. All I can tell you for sure is that it works with the current Kanotix (which uses a very recent kernel). I’m using it now…

你好嗎

…as you can see.

I’m the first to admit that Linux is not yet quit as easy to use with Chinese as Windows XP. But it is workable.

Just for your interest, if you’re wondering how I knew to install all of the above to get Xcin working, the trick was to use the “apt-cache” command, which actually does a lot of useful stuff. To find out what dependencies Xcin has:

bob@sonic:~> apt-cache depends xcin
xcin
Depends: libc6
Depends: libdb3
Depends: libtabe2
Depends: xlibs
Depends: locales
Suggests: libtabe-db
Suggests: xfonts-base
Suggests: xfonts-intl-chinese
Suggests: xbase-clients
Suggests: x-ttcidfont-conf
|Suggests: ttf-arphic-bsmi00lp
Suggests: ttf-arphic-bkai00mp
|Suggests: ttf-arphic-gbsn00lp
Suggests: ttf-arphic-gkai00mp
Suggests: xfonts-cmex-big5p
Recommends: rxvt-ml

If you wanted to know everything that Debian has to do with Chinese, try:

apt-cache search chinese

(I won’t show the output here because it’s too long)

If you wanted details about a particular package, such as xcin:

apt-cache show xcin

If you wanted to know the names of every package installed on the system:

apt-cache pkgnames

As always, the man page gives a lot of details (man apt-cache), maybe more details than you ever wanted to know.

regards,
Robert

So are there any IMEs for Chinese under Linux (particularly Debian/Kanotix) that don’t suck/actually work? I’ve tried chinput, scim, xcin, and a couple of others, and they all pretty much either failed, or in the case of xcin, suck.

As far as I know, under Debian/Kanotix, sucky Xcin is all there is. If you need good Chinese support, then I recommend Fedora. I’ve got my Taiwanese wife using it, and she finds it as good as Chinese Windows XP. But it’s not a live CD, you’ve got to install it on the hard drive. It’s four CDs - I recommend that you select the “Install Everything” option when it asks you which packages to install. That eats up about 7 GB of hard disk space, but you’ll have every program plus the kitchen sink and won’t need to go out looking for other software.

Fedora is a bit slow - it’s OK on a fast or mid-ranger machine (1 GHz or more), but I wouldn’t run it on anything slower. I’ve heard that the new Fedora Core 4 (due to be released in June) will be faster.

I understand that Mandrake has good Chinese support, but I haven’t tried it, so I can’t give it my wholehearted endorsement.

cheers,
DB

Actually, I stand corrected. scim works and works brilliantly. Very reminiscent of the Windows IMEs, right down to “smart pinyin” (ie tones optional). Unfortunately at the moment I don’t know how to use pinyin to type in Traditional, but it’s a start. At first nothing worked, but after following this thread’s instructions, I am gold. I’ve just signed up to that list to ask about pinyin-traditional, so we’ll see soon…

In SCIM, if I choose Chinese (Simplified) -> Smart Pinyin, I get a toolbar with four buttons - the second one shows “中”.
When I click it, it cycles through 中/英/简/繁 - Chinese(both traditional and simplified), English, simplified Chinese, traditional Chinese.

Oooh, I didn’t know that. I resorted to using the uim IME on there earlier. Now if only I could work out how to actually get bloody Chinese input into pyDict or stardic - can’t copy and paste, scim input won’t work on those… won’t work on OpenOffice.org or Firefox either, and I haven’t tried many others. Works on gedit though.

I did a little experimenting and have gotten it to work (more or less) with most apps. For an individual user, add these lines to your .bashrc file:

export LC_CTYPE=zh_TW
export XMODIFIERS=“@im=SCIM”
scim -d

SHIT! The damn spelling “corrector” on Forumosa keeps messing it up. After the @ there should be a lowercase “i” followed by a lowercase “m”, but Forumosa keeps changing it to “I’m”. So, you’ll need to change it back manually if you cut and paste from this post - can’t be helped.

OK, you’ll have to log out and log in once before these settings take effect. Now, next time you open an xterm, you should see this message:

Smart Common Input Method 1.0.2
Launching a SCIM process with x11…
SCIM has been successfully launched.

Any application you launch from that xterm (like firefox) should work with scim (after you hit ctrl-space, of course). Using it right now in Firefox: 你好嗎

cheers,
DB

And where do I find the .bashrc file? (Newbie here)

Never mind, somehow I seem to have got it working. 看我的!

Edit: Or not. Apparently now it’ll work in Firefox (didn’t even have to change anything) but still won’t work in pyDict. Guess I’ll have to dig up the file after all.

Edit 2: And viola, thanks to that edit to .bashrc (care to explain exactly what that stuff means?) I can now actually use pydict. Thanks!

The .bashrc file is in your home directory (/home/your_name/.bashrc). Anyway, there are countless ways to set these things, and I’m not sure which one is best in Debian, but I think you should modify the .xsession file (in the same directory). In this way, SCIM will work with any application. If .xsession is not there, create a new one (with any text editor), and add these lines:

export XMODIFIERS="@im=SCIM" export LC_CTYPE=zh_TW.UTF-8 scim -d
Reboot (or press ctrl-alt-backspace to restart the X server), and it should work.

Grr… I thought the “code” tags would prevent the “corrector” from messing with the text… guess not.