SCIM and Crux

Edit: Unfortunately, the images originally included in this post are gone, because of hosting problems in late 2009. My apologies.

I managed to compile, configure and use SCIM in Crux, and with only minor annoyances, it’s working well too. I found (very) out-of-date Pkgfiles for scim, anthy and scim-anthy on the ports search page for Crux 2.4, and after some minor modifications, I’ve got them all running in a happy little triangle, sort of.

Configuring them was the hard part; for some reason (which I understand now) scim was starting when I added the variables and start line in my .xinitrc file, but it was dropping away and quitting without ever doing anything. Which meant that the entire business was kind of a flop, even if it did compile, install and configure for me.

In short, I had been following the Crux page on SCIM configuration, changing the important parts from Chinese to Japanese. Adding those lines to /etc/profile (or .profile) was only a little successful, and the best results, really, were when I put them into .xinitrc. So I modified them only slightly, to this:

export LC_CTYPE=ja_JP.UTF-8
export GTK_IM_MODULE=scim
scim --no-socket -f x11 -d &

And that seems to do the trick. (Note the ampersand at the end of the last line.) The SCIM toolbar pops up when I trigger it with the zenkaku/hankaku key, and behaves just about right … except for my font issues.

For some reason the font appearing in, for example, Leafpad or a form on Firefox, are strange and twisted code letters. I have a feeling there’s a font I don’t have installed that I need to put into place, or worse, perhaps there’s something that I need to have configured before I compile those programs (--enable-nls? I wonder).

I don’t know for sure, and I fear the latter, since the fonts work fine in rxvt-unicode and within SCIM itself. If an extra font was needed, I wonder if it would just show coding boxes everywhere, rather than selectively having correct hiragana-katakana-kanji equivalents in some places as it does now.

Anyway, I’m definitely learning a lot from Crux, although it’s usually the old fashioned way — with me making a mistake, and Crux hitting me upside the head for it. I like to think of it as tough love.

P.S.: Here are the ports I made, borrowing from the outdated ones that appear in the Crux repository search.

# Description: Japanese input converter.
# Maintainer: 
# URL:
# Depends on:


build() {
        cd $name-$version
        ./configure --disable-nls --prefix=/usr
        make install DESTDIR=$PKG PREFIX=$PKG/usr
# Description: Smart Common Input Method platform for Gnome (GTK).
# Maintainer: 
# URL:
# Depends on: gtk intltool


build() {
        cd $name-$version
        ./configure --prefix=/usr --enable-nls
        # enable-nls is necessary for scim!
        make install DESTDIR=$PKG
        rm -rf $PKG/usr/share/locale
# Description: Anthy interface for Smart Common Input Method.
# Maintainer: 
# URL:
# Depends on: scim anthy gtk


build() {
        cd $name-$version
        ./configure --disable-nls --prefix=/usr
        make install DESTDIR=$PKG PREFIX=$PKG/usr

8 thoughts on “SCIM and Crux

  1. bkanev

    I think, if I get it right, those symbols you refer to as problematic fonts, are the phonetic transcription of the letters/ words/ sounds in Japanese.

  2. K.Mandla Post author

    Hmm. I think you can see the problem I’m having in the screenshot — the text in Leafpad should look like the text in urxvt, but instead it’s a strange conglomeration of characters — no kana at all.

    I’m pretty sure there’s some sort of outside setting that I need to adjust.

  3. Pingback: SCIM, Kazehakase and WebKit « Motho ke motho ka botho

  4. Pingback: By the way … Crux 2.5 on a K6-2+, 256Mb « Motho ke motho ka botho

  5. johnraff

    …or encoding?
    Those funny boxes look like what I get when I try to view an SJIS encoded file in UTF8.

    But scim shouldn’t be using SJIS …

  6. Eirik

    On the off-chance that you get email alerts on new comments on old posts, thank you!

    I’ve been mildly annoyed for years that I could get scim+anthy+custom .xsession to work with utf8, English language and Norwegian characters/locale, and *reading* Japanese in the console, but no input…

    Finally I figured out that all that was missing was a simple -imlocale ja_JP.UTF-8 parameter to my urxvtc invocations… Not quite because of this blogpost, but sort of 😉

    Anyway, now I can finaly ctrl-space for Japanese input in the terminal, not just gtk apps!

    To clarify, for other googlers: On Debian, to get unicode, Japanese input etc to work with anotherwise non-Japanese localized install:

    On startup of X11 (eg: in .xsession):
    export XMODIFIERS=”@im=SCIM”
    export GTK_IM_MODULE=”scim”
    export XIM_PROGRAM=”scim -d”
    export QT_IM_MODULE=”scim”
    scim -d &

    Set your locale as normal, eg:


    Start up your urxvt-daemon (to share some resources, similar to how gnome-terminal works):

    urxvtd -q -f -o

    And start your terminals (from .xsession or manually):

    urxvtc -rv -vb -geometry “$103×57+280+2” -imlocale ja_JP.UTF-8

    Relevant packages:
    scim-anthy rxvt-unicode-ml
    (And pretty much everything that matches (with debtags installed):
    aptitude search ‘?and(?tag(culture::japanese), ?tag(x11::font))’



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s