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
About these ads

8 Responses to “SCIM and Crux”

  1. 1 bkanev 2008/04/03 at 3:16 PM

    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. 2 K.Mandla 2008/04/03 at 3:59 PM

    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. 3 bkanev 2008/04/04 at 6:18 AM

    yeah, I see now – you are right, it must be fonts problem

  4. 4 johnraff 2008/12/21 at 12:53 AM

    …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 …

  5. 5 Eirik 2009/06/24 at 1:42 PM

    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))’


  1. 1 SCIM, Kazehakase and WebKit « Motho ke motho ka botho Trackback on 2008/04/15 at 11:01 PM
  2. 2 By the way … Crux 2.5 on a K6-2+, 256Mb « Motho ke motho ka botho Trackback on 2008/12/19 at 6:52 PM

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s


Visit the Wiki!

Some recent desktops

May 6, 2011
Musca 0.9.24 on Crux Linux
150Mhz Pentium 96Mb 8Gb CF

May 14, 2011
IceWM 1.2.37 and Arch Linux
L2300 core duo 3Gb 320Gb

Some recent games

Apr. 21, 2011
Oolite on Xubuntu 11.04
L2300 core duo 3Gb 320Gb

Enter your email address to subscribe to this blog and receive notifications of new posts.

Join 405 other followers


This work is licensed under the GNU Free Documentation License. Please see the About page for details.

Blog Stats

  • 3,963,431 hits



Get every new post delivered to your Inbox.

Join 405 other followers

%d bloggers like this: