.comment-link {margin-left:.6em;}

David @ Tokyo

Perspective from Japan on whaling and whale meat, a spot of gourmet news, and monthly updates of whale meat stockpile statistics

12/06/2007

 

More Debian (lenny) setup notes - Japanese notes

So what use is a computer without Japanese input?

I was using UIM before, but apparently SCIM is pretty good too so I'm giving it a shot. These input method setups seem to be changing quite a lot so probably the next time I come back to read this again it will probably all be different, but hey you never know.
$ sudo aptitude install scim scim-anthy
This gets a bunch of other package dependencies including im-switch. This package was apparently introduced so that users wouldn't need to futz around with their .xsession file or whatever to get their CJK input methods working.

I forget exactly what I did after this to get things working, but I believe it was something like this...
1) make sure you have your UTF-8 locale set up. This is one way.
$ echo $LANG
en_US.UTF-8
$
Yeah, en_US is fine, you don't need to use ja_JP.UTF-8 to get your Japanese working. UTF-8 is good.

2) fiddle with im-switch.
$ im-switch -c

There are 5 candidates which provide IM for /home/david/.xinput.d/en_US:

Selection Alternative
-----------------------------------------------
+ 1 default
2 none
3 scim
4 scim-immodule
5 th-xim
System wide default for en_US (or all_ALL) locale is marked with [+].
Press enter to keep the current selection[*], or type selection number:
Well it seems like we get a menu like this. Typing "3" here to select scim seems to do the trick.

Now shut out of your X session, and login again. When X starts up it appears to read the config files stored under /etc/X11/Xsession.d/, and included in here is now a file called 80im-switch. This script will go looking for a configuration file in your home directory at ~/.xinput.d.
Here's mine:
$ ls -lg
total 0
lrwxrwxrwx 1 david 28 2007-12-06 23:32 en_US -> /etc/X11/xinit/xinput.d/scim
Wow, going round in circles aren't we, but if we take a look inside the file that this sym-link points to, it contains env vars like this:
XIM=SCIM
XIM_PROGRAM=/usr/bin/scim
XIM_ARGS="-d"
GTK_IM_MODULE=xim
QT_IM_MODULE=xim
If you look at the bottom of the /etc/X11/Xsession.d/80im-switch that picked up this config file, it shows that the value specified in XIM_PROGRAM is executed. All this happens when X is starting up. Passing -d to scim makes it run as a daemon apparently, and sure enough:
$ ps -ef | grep scim
... well, you get the picture, scim has been started up for us by X. Yay.

Finally, rather than use the default CTRL-Space combination to pull up the Japanese input method, you can configure scim to use the Hankaku/Zenkaku key (on a jp106 keyboard) to be the trigger instead. Other configurable stuff too:
$ scim-setup
This seems just fine for everyday use now.

Almost back to normal - just video playback / sound etc to fix now...

Labels: , ,


Comments: Post a Comment



<< Home

Archives

June 2004   July 2004   August 2004   September 2004   October 2004   November 2004   December 2004   January 2005   March 2005   April 2005   May 2005   June 2005   July 2005   August 2005   September 2005   October 2005   November 2005   December 2005   January 2006   February 2006   March 2006   April 2006   May 2006   June 2006   July 2006   August 2006   September 2006   October 2006   November 2006   December 2006   January 2007   February 2007   March 2007   April 2007   May 2007   June 2007   July 2007   August 2007   September 2007   October 2007   November 2007   December 2007   January 2008   February 2008   April 2008   May 2008   June 2008   July 2008   August 2008   September 2008   October 2008   November 2008   December 2008   January 2009   February 2009   March 2009   April 2009   May 2009   June 2009   July 2009   August 2009   September 2009   October 2009   November 2009   January 2010   February 2010   April 2010   May 2010   June 2010   July 2010   August 2010   September 2010   February 2011   March 2011   May 2013   June 2013  

This page is powered by Blogger. Isn't yours?