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 XMODIFIERS=@im=SCIM
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: http://sourceforge.jp/projects/anthy/ # Depends on: name=anthy version=9100 release=1 source=(http://globalbase.dl.sourceforge.jp/$name/26131/$name-$version.tar.gz) build() { cd $name-$version ./configure --disable-nls --prefix=/usr make make install DESTDIR=$PKG PREFIX=$PKG/usr }
# Description: Smart Common Input Method platform for Gnome (GTK). # Maintainer: # URL: http://www.scim-im.org/ # Depends on: gtk intltool name=scim version=1.4.7 release=1 source=(http://dl.sourceforge.net/sourceforge/$name/$name-$version.tar.gz) build() { cd $name-$version ./configure --prefix=/usr --enable-nls # enable-nls is necessary for scim! make make install DESTDIR=$PKG rm -rf $PKG/usr/share/locale }
# Description: Anthy interface for Smart Common Input Method. # Maintainer: # URL: http://sourceforge.jp/projects/scim-imengine/ # Depends on: scim anthy gtk name=scim-anthy version=1.2.4 release=1 source=(http://osdn.dl.sourceforge.jp/scim-imengine/25404/$name-$version.tar.gz) build() { cd $name-$version ./configure --disable-nls --prefix=/usr make make install DESTDIR=$PKG PREFIX=$PKG/usr }
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.
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.
yeah, I see now – you are right, it must be fonts problem
Pingback: SCIM, Kazehakase and WebKit « Motho ke motho ka botho
Pingback: By the way … Crux 2.5 on a K6-2+, 256Mb « Motho ke motho ka botho
…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 …
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:
LANG=”en_GB.UTF-8″
LC_CTYPE=”nb_NO.UTF-8″
LC_NUMERIC=”nb_NO.UTF-8″
LC_TIME=”nb_NO.UTF-8″
LC_COLLATE=”nb_NO.UTF-8″
LC_MONETARY=”nb_NO.UTF-8″
LC_MESSAGES=”en_GB.UTF-8″
LC_PAPER=”nb_NO.UTF-8″
LC_NAME=”nb_NO.UTF-8″
LC_ADDRESS=”nb_NO.UTF-8″
LC_TELEPHONE=”nb_NO.UTF-8″
LC_MEASUREMENT=”nb_NO.UTF-8″
LC_IDENTIFICATION=”nb_NO.UTF-8″
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))’
-e