# HOWTO: Enabling Japanese (or: CJK in KDE & Gnome)

## Sudrien

This is a static version of Enabling Japanese at the Gentoo Wiki. A pervious version is archived here. This contents of this page was updated on 3 Febuary 2006.

Enabling Japanese 

Support is available in the Desktop Environments forum. Make sure to include all the appropriate versions of things - like kde-3.3.4.

Of all languages to learn, Japanese is known as one of the most challenging - not because of the spoken language, but the written language. The objective of this HOWTO is to make your gentoo box work with that written language. For this, there are two sections: Japanese Fonts, and Japanese Input. Those setting up input should, of course, set up their fonts first. New installations will want to make sure they have the proper USE flags set, as outlined below.

---

Japanese Fonts

You simply want to read the stuff, say, in Mozilla Firefox. You need to install fonts - A good sign that you have not installed the proper fonts is that the following characters appear as boxes with numbers inside: 日本語フォント

emerge media-fonts/kochi-substitute For Japanese

emerge media-fonts/arphicfonts For Chinese

emerge media-fonts/baekmuk-fonts For Korean

It never hurts to get them all. 

There are other cjk and unicode fonts available in the portage tree, to be found with emerge search fonts, with some notible exceptions: Bitstream Cyberbit, available in an ebuild outside of portage, due to questions in licensing. Arial Unicode MS is another great font, which you may or may not have access to. There have been reports of errors in emulators while using this font, but this same procedure can be followed for any Microsoft-provided truetype fonts you may find:

```
emerge cabextract
```

Find a copy of aruniupd.exe - online availability changes.

```
cabextract aruniupd.exe
```

For system-wide installation use

```
cp *.ttf /usr/share/fonts/
```

for local installation (no root access)

```
cp *.ttf ~/.fonts/
```

Then

```
fc-cache -fv
```

Programs will probably have to be restarted to access new fonts.

Arial Unicode MS is now available to your system. Web browsers like Firefox should probably have this mentioned in their settings. Specifically, in Mozilla Firefox, look at See Preferences >> General >> Fonts & colors >> Fonts for: Japanese

Java 1.4.x 

This has been tested on blackdown-jdk-1.4.2.03 :

```
cd $JAVA_HOME/jre/lib/

cp font.properties font.properties.old

cat font.properties.ja | sed "s/-watanabe-mincho/-misc-Kochi Mincho-medium/g" | sed "s/-wadalab-gothic-medium/-misc-Kochi Gothic-medium/g" > font.properties

echo 'appendedfontpath=/usr/share/fonts/kochi-substitute' >> font.properties

/usr/sbin/env-update && source /etc/profile
```

Java 1.5 (unverified) 

frostschutz says:

According to some docs I've read, Java 1.5 is supposed to support 'fallback fonts' without having to add them explicitely to fonts.properties. So all you have to do is to create a .../jre/lib/fonts/fallback/ directory and put at least one unicode font with Japanese support in there (or, since these fonts tend to get very big, just a symlink to an existing font in your /usr/share/fonts/ directory). 

Japanese Input 

Fonts are not enough for you? Good. Let's prep your system for input support. It should be noted that this process is quite similar for Chinese, Korean, and a host of other languages. 

Setting Locale 

Using japanese characters means using character sets outside the normal POSIX range; Unicode characters. To input them, you need to allow their use on your system.

```
locale

LANG=

LC_CTYPE="POSIX"

LC_NUMERIC="POSIX"

LC_TIME="POSIX"

LC_COLLATE="POSIX"

LC_MONETARY="POSIX"

LC_MESSAGES="POSIX"

LC_PAPER="POSIX"

LC_NAME="POSIX"

LC_ADDRESS="POSIX"

LC_TELEPHONE="POSIX"

LC_MEASUREMENT="POSIX"

LC_IDENTIFICATION="POSIX"

LC_ALL=

```

All of the entries should be either blank or say "POSIX", unless your locale has been previously set. If so, you need to figure out where. ; )

```
locale -a

de_DE.utf8

en_GB.utf8

en_US.utf8

fr_FR.utf8

ja_JP.utf8

```

Gives a list of all the unicode locales availble on your system. This list can be expanded or limited by editing your needed locales, should you be missing an entry. Uou are choosing the language you want your menus to be in, NOT the one you are currently setting up input for. For example, a Frenchmen wanting to write japanese would choose fr_FR.utf8 from this list. 

Now, continuing with the Frenchman example: 

```
echo LANG="fr_FR.UTF-8" >> /etc/env.d/02locale

env-update

>>> Regenerating /etc/ld.so.cache...

source /etc/profile
```

Notice the change from utf8 to UTF-8. It is required since all UTF 8 enabled locales are specified in terms of UTF-8 and not utf8. Make sure it has taken effect.

```
locale

LANG=fr_FR.UTF-8

LC_CTYPE="fr_FR.UTF-8" 

LC_NUMERIC="fr_FR.UTF-8"

LC_TIME="fr_FR.UTF-8"

LC_COLLATE="fr_FR.UTF-8"

LC_MONETARY="fr_FR.UTF-8"

LC_MESSAGES="fr_FR.UTF-8"

LC_PAPER="fr_FR.UTF-8"

LC_NAME="fr_FR.UTF-8"

LC_ADDRESS="fr_FR.UTF-8"

LC_TELEPHONE="fr_FR.UTF-8"

LC_MEASUREMENT="fr_FR.UTF-8"

LC_IDENTIFICATION="fr_FR.UTF-8"

LC_ALL=

```

If not, restart, reboot, and ask questions afterwards. 

Ok, one answer: /etc/env.d/02locale is used because of precident, and outlined as such in Using UTF-8 in Gentoo, a good thing to read if you have issues at this point or later.

Setting USE flags 

Next, you need to add the following USE flags to your make.conf, if they do not already exist:

cjk - standing for 'Chinese Japanese Korean' - gives support for Hanzi-inspired characters ( two byte, kanji, the reason you get al those accented 'a's).

nls - 'native language support' - supposedly for enabling other languages in your interface, the nls flag could be used by some ebuilds as an 'other language support'; Enabled this as a one of many safeguards to ensure that Japanese locality is compiled in.

immqt-bc - lets Qt handle different input methods.

-immqt - This is explicitly disabled because it conflicts with immqt-bc. Setting this flag would require recompiling all programs that depends on Qt3, and has broken in the past. THis recomendation will change with Qt4.

unicode - Unicode is the pot every character is thrown in (except cursive Hebrew, apparently ^.^; )

With these flags set in your /etc/make.conf, you should make sure all your currently portage-installed packages have the correct support built in. New systems should make sure to do this early (if not recompiling all packages), to avoid rebuilding as much software packages as possible.

```
emerge world --newuse
```

Input Methods 

Now, Japanese has both kana and kanji - you need a dictionary to give you possible kanji. Anthy is different from other systems available because it does not require any services to be started. 

```
emerge anthy
```

Now that the dictionary is installed, an additional input method will be built.

UIM, the Universal Input Manager, is what routes keyboard input.

```
emerge uim
```

On its own, UIM is enough (under gtk+) to handle Japanese input. You can check this from the text entry context menu of most gtk+ programs (excluding firefox), in which UIM-anthy will be one of the new choices. UIM, in fact, becomes the defauilt gtk+ input method once installed - and it has a Gnome control panel available if you are satisfied with switching methods via keyboard. (qt requires an export QT_IM_MODULE=uim statement)

Graphical Input Method selection 

SCIM, the Smart Common Input Method, provides a taskbar icon and menu for switching between input methods. It is especially good for computers with more than two methods available - or for people that prefer mouse access.

```
emerge scim-uim
```

Qt needs an aditional step to use scim - emerge scim-qtimm. GTK+-only users do not need to do this though.

Now that everything is installed, we just need to tell everything to use scim. The following can go in /etc/xprofile for all users, or your own ~/.xprofile.

```
export XMODIFIERS=@im=SCIM

export XMODIFIER=@im=SCIM

export GTK_IM_MODULE=scim

export QT_IM_MODULE=scim
```

Wrapping up 

To actually use your input method, you will at have to env-update; source /etc/profile and restart X11; you may possibly have to reboot.

Once you have done so, start up a text editing program like kwrite or gedit. A keyboard icon will appear in the system tray, that lets you select from your different input methods.

Once you are using an input method, like uim-anthy, there several modes to choose from: raw input, hiragana, katakana, half-width katakana, and a typewriter-like variation of the latin alphabet. Start typing in Hiragana mode, and you text will be converted as the appropriate kana are found. The spacebar brings up a list of possible kanji and cycles through it, and hitting enter accepts and uses the replacement. More keyboard combinations are at uim-anthy.

Notes 

CJK fonts sometimes cause xorg-x11 compiled with the flag hardened to fail when starting up. Reference

"To enable UTF-8 on the console, you should edit /etc/rc.conf and set UNICODE="yes", and also read the comments in that file"

"Alternate WMs" Reference

GMplayer just doesn't, okay?

If you get letters that are inconsistant with the font you expected, you are not using raw input mode. Try some other modes.

The SCIM button can seem to flash or temporatily dissapear. This is because scim keeps settings per program - firefox input could be in Japanese while Gedit is in another language. 

Gjiten & Kiten (part of kedu) are japanese dictionary programs, using EDICT. Gjiten is more comprehensive, but requires you to manualy install dictionaries. Nihongo Benkyo is another possibility, Bug 112894 for ebuilds

We'll get to Qt4 when KDE does.

See also

HOWTO Make your system use unicode/utf-8

Inputting Japanese text in Linux and some BSDs

Linux Internationalization HOWTO

SCIM wiki

Anthy Wiki (Japanese)

UIM

More on Chinese fonts

---

Support is available in the Desktop Environments forum. Make sure to include all the appropriate versions of things - like kde-3.3.4.Last edited by Sudrien on Fri Dec 15, 2006 3:58 pm; edited 35 times in total

----------

## Radi

thanks for the howto.

i was looking for a programm like scim for quite a while. For Konfiguration Issues and kde integration you can add

```
emerge skim
```

to your howto.

i put the language variables into the /etc/xprofile file.

```

export LANG=de_DE.UTF-8

export LC_CTYPE=ja_JP.UTF-8 # this modification is needed if you want to use openoffice with scim!!!!!!!!

export XMODIFIERS=@im=SCIM 

export GTK_IM_MODULE=scim 

export QT_IM_SWITCHER=imsw-multi

export QT_IM_MODULE=scim

```

This is also working if you use kdm or gdm

----------

## Sudrien

Thanks, Radi.  :Smile: 

Content deleted due to ebuild changes

I don't think the QT_IM_SWITCHER really needed -  imsw-multi is the default, is it not?

-Sud.Last edited by Sudrien on Fri May 20, 2005 2:25 am; edited 1 time in total

----------

## Vanquirius

どもーありがと！

Ｉ　ｃａｎ　ｆｉｎａｌｌｙ　ｔｙｐｅ　Ｊａｐａｎｅｓｅ　ｉｎ　Ｆｉｒｅｆｏｘ　（火の狐），　ｗｈｏｏ−ｈｏｏ．　Ａｎｄ　ｃｏｎｖｅｒｔｉｎｇ　ｋａｎａ　ｔｏ　Ｋａｎｊｉ　ｗｏｒｋｓ　ａｓ　ａ　ｃｈａｒｍ　ｔｏｏ！　Ｎｏ　ｍｏｒｅ　ｎａｓｔｙ　Ｋａｎｊｉｐａｄ　；−）

----------

## RyoHazuki

Guys,

Sorry for the lame question..

but do you think this may also work for Gnome?

I am despertly in need to write japanese under Gnome.

Cheers,

Ryo

----------

## Vanquirius

Second line of this thread, click on the link.

----------

## RyoHazuki

 *Vanquirius wrote:*   

> Second line of this thread, click on the link.

 

 :Embarassed:  Obrigado!

silly me.

----------

## Sudrien

 *RyoHazuki wrote:*   

> 
> 
> but do you think this may also work for Gnome?
> 
> 

 

Actually, this should work under Gnome, and any other setup with a standard system tray. I had it working under my (custom) Xfce4 setup for a while, although uim-anthy is all I really need. But many people like buttons.  :Wink: 

-Sud.

----------

## Sudrien

I'm offically recomending this thread over the old one now.   :Very Happy: 

-Sud.

----------

## rshadow

Anybody know the LC_CTYPE for Korean? I've been trying to get a korean input solution for the wife for a very long time.

----------

## Sudrien

 *rshadow wrote:*   

> Anybody know the LC_CTYPE for Korean? I've been trying to get a korean input solution for the wife for a very long time.

 

I believe ko_KR.utf8 us the one you want (check the capitolization, that can matter).

Uim should include at least one korean input. Just skip the anthy/canna stuff, and you should be set.  (Should, as in I-don't-know-any-korean)

-Sud.

----------

## hiroki

hi!

i'm using SCIM for a long time now (for inputting japanese, chinese and korean). but.. there is just one problem with it. and as i read your howto i think you might have that problem too.

setting LC_CTYPE=ja_JP.UTF-8 causes my JAVA-apps to run in japanese, too!! i have no explanation why LC_CTYPE changes the interface-language, but myjava-apps are now in japanese. at least those, that have a japanese translation available! only when i set LC_CTYPE back to de_DE i have the usual german/english interface. but this again makes it impossible to use SCIM in that special application i start with de_DE as LC_CTYPE.

any solutions for that??

thx

----------

## yaneurabeya

Borrowing a Naruto key phrase:

すげぃだってばよ！　やっと俺がリナックスでも日本語で書けるじゃあん。

One question though... Where might the text-config be so I can change the char map for this sucker? The key input options (even when I can change them) sort of suck for the scim config. I can't get any of the good function keys to work under XFCE and my options are sort of limited to ALT, SHIFT, CRTL, SPACE, and RELEASE.

----------

## Sudrien

hiroki: As far as I know, setting LC_CTYPE differently is only needed for Openoffice-1.x, to get around a known issue. You should not need to set it in any other case (which would include openoffice-ximian, which I would recomend if at all possible). Your input methods tend to ignore these values, since they are for other languages already. 

For future refernce, what input methods do you prefer?

yaneurabeya: Um... What? My japanese isn't what it could be. But for key mapping, you need to understand this: scim is only the means to choose your input method. Yes, it does have some methods of its own,  but if you are using the uim-anthy or uim-canna of this tutorial, you will have to look up uim configuration. 

And pass informative links back to the community.  :Wink: 

-Sud.

----------

## hiroki

 *Sudrien wrote:*   

> hiroki: As far as I know, setting LC_CTYPE differently is only needed for Openoffice-1.x, to get around a known issue. You should not need to set it in any other case (which would include openoffice-ximian, which I would recomend if at all possible). Your input methods tend to ignore these values, since they are for other languages already.

 

well, I use OpenOffice (not ximianized version). And I additionally have an OpenOffice-2-beta installed. So I'm going to try whether OpenOffice2 still needs this LC_CTYPE-flag or not. If so I'll have to keep it and watch all my JAVA-apps running in Japanese [urg] and of not, I'llkick it out. A Japanese interface is not that bad, it's just that some apps use fonts, that cannot display Japanese characters and then show lots of ugly boxes   :Rolling Eyes: 

Otherwise it would be OK. 

 *Sudrien wrote:*   

> 
> 
> For future refernce, what input methods do you prefer?
> 
> 

 

I use SCIM in order to access the following input methods:

Japanese -> SKK

Chinese -> SmartPinyin, WuBi (When I only know the Japanese reading of a character and therefore need to type it just by knowing it shape/components)

Korean -> Romaja

PS:

harharrrrr, OpenOffice2 doesn't need LC_CTYPE to be set in order to allow SCIM to work.. yeeeehaaaaa   :Laughing: 

/me is thinking about trying ximian openoffice though...

/me wonders whether it's better?

but /me definately likes (loves?) OOO2  :Confused: 

PS2:

 :Crying or Very sad: 

sorry, it was all wrong... I cannot use SCIM without LC_CTYPE set anymore... neither in OOO nor in i.e. Xterm...

PS3:

OK, now it's enough!

I just simply unset LC_CTYPE, I guess that was wrong. So setting it to de_DE.UTF-8 [and LC_ALL, too, and LANG, too] helped. workes fine, for all apps! yippieh!!!   :Very Happy: 

PS4:

OMG! Won't this end! I discovered that with LC_CTYPE=de_DE.UTF-8 I cannot type Japanese [or generally speaking: use SCIM] when launching an xterm from another xterm. So typing "xterm" [enter] in an already running xterm will end in a new xterm that cannot use SCIM ><  :Sad: 

----------

## hiroki

OK   :Evil or Very Mad: 

I don't know why, but over here it does not work without LC_CTYPE=ja_JP.utf8

I have nooo idea why. If LC_CTYPE is not modified from the default (POSIX?) or set to de_DE.utf8 I cannot type Japanese [use SCIM], I can only use it in GTK-apps. (but not in Xterm, or qt-apps, etc.)

WHY?

----------

## erwan

Well, I think the LC_CTYPE thing is not specific to OpenOffice but to any non-Gtk+2 non-Qt application.

However, I have a problem with these X applications, for example Java applications. When I hit Ctrl+space the SCIM bar actually appears but I can only select English/European, not Japanese. It is working fine in both Gtk+2 and Qt applications, and I have LC_CTYPE set to ja_JP.UTF-8.

----------

## vyzivus

T-5h: I needed to type five sentences in japanese (I'm using UIM)

T-4h: Aha, so gcc-3.4.3 is the source of anthy's dementness! WTF? Butterfly effect totally sucks to this  :Smile:  Like, "I fart here" VS "dark force conquers hundred planets" is more connected than this crap. Oh well. I'd love to use canna, if I may, oh the great UIM.

T-3h: UIM does not support canna (my .uim file:

```
(define default-im-name 'canna)

(define-key generic-on-key? '("<Shift><Control> "))

(define-key generic-off-key? '("<Shift><Control> "))
```

uim-im-whatever offers only anthy (plus skk plus other things obviously from second reality)

T-2.5h: A little lunch would be wise.

T-2h: SCIM is nice but I don't need to click through 5 menus to change the keyboard, thank you. Ctrl+Shift+Space is enough for me.

T-1h: SCIM supports anthy and UIM, which supports only anthy.

NOW: UIM still does not support canna. AAAAAAAAAAAAAAAAAAAAAARRRRRRRRRRRRRRGHHHHHHHH!!!!!!!!!!!!!!!

----------

## Sudrien

UIM-Canna will be created with emerge uim only when canna has already been installed.

-Sud.

----------

## 2crazy

Hi all,

say, what backend are you using? I'm asking because neither of them converts hiragana into kanji the way was used to with im-ja. Since im-ja doesn't work with gtk+ 2.6, I switched to scim.

I tried skk, wnn, anthy, or the generic tables, no real kanji conversion  :Sad: 

Am I missing somthing here? Hirgana/Katakana are working just fine though.

Thanks

----------

## Sudrien

The standard keys are: Shift+space ひらがな, which will be underlined. then you continue hitting the spacebar for kanji options,a nd enter to confirm.

If you're using GTK 2.6, I'd suggest canna. make sure the init script is running. 

-Sud.

----------

## yaneurabeya

Just thought I might mention my findings from this thread: https://forums.gentoo.org/viewtopic.php?p=2050028#2050028 . In short, if certain programs like Mozilla stop working, recompile scim and scim-uim. 

Also, it seems as if anthy works fine with gcc 3.4.3 now, but I'm not 100% sure...

//Edit: It doesn't work after all.

----------

## yaneurabeya

やった！GCC 3.4.3を使って、Anthy 5900-r1でまた日本語で書けるようになちゃったひょ~~！！！ ^0^.

Translation: emerge anthy-5900-r1 if you have gcc-3.4.3  :Smile: .

Add app-i18n/anthy ~x86 to /etc/portage/package.keywords.

They did change the conversion tables a bit though. Can't get 小さい「い」 by typing 'li' like in previous versions of anthy and Windows IME. So, just out of curiousity, is there any way to fix this Sud  :Smile: ?

----------

## hiroki

 *yaneurabeya wrote:*   

> Can't get 小さい「い」 by typing 'li' like in previous versions of anthy and Windows IME. So, just out of curiousity, is there any way to fix this Sud ?

 

maybe you should try "xi"... also works for "xtsu"? (ぃ｜い)(っ｜つ)

----------

## yaneurabeya

 *hiroki wrote:*   

> maybe you should try "xi"... also works for "xtsu"? (ぃ｜い)(っ｜つ)

 

Awesome, thanks for the tip  :Smile: . Now what about the dot (in Windows can be referenced with the forward slash key)?

----------

## hiroki

 *yaneurabeya wrote:*   

>  *hiroki wrote:*   maybe you should try "xi"... also works for "xtsu"? (ぃ｜い)(っ｜つ) 
> 
> Awesome, thanks for the tip . Now what about the dot (in Windows can be referenced with the forward slash key)?

 

what dot?

do you mean like in:

コンピューター・サイエンス

 :Question: 

well, i don't know it for anthy 'cause i use SKK [i lot it, give it a try  :Wink:  ]

and there i type "/." + <space> to get it.

----------

## yaneurabeya

Nope, that doesn't work  :Sad: . I'll just look up some SCIM/Anthy documentation I suppose =\...

----------

## Sudrien

z/ = ・

Emergeing anthy-5900-r1 now  :Very Happy: 

EDIT:It works! Proper grammar inserted into howto. 

-Sud.

----------

## maiku

With fluxbox and xorg when I put   *Quote:*   

> export LANG=en_US.UTF-8
> 
> export LC_CTYPE=ja_JP.UTF-8 
> 
> export XMODIFIERS=@im=SCIM
> ...

 in /etc/xprofile or in ~/.xprofile and startx there are no changes and "locale" does not show a change.  When I put it in .xinitrc fluxbox takes a tremendously long time to load.  I'm not using KDE or anything, just fluxbox.  It does load eventually just after a long time.

What do you think?

----------

## Sudrien

 *maiku wrote:*   

> With fluxbox and xorg when I put   *Quote:*   export LANG=en_US.UTF-8
> 
> export LC_CTYPE=ja_JP.UTF-8 
> 
> export XMODIFIERS=@im=SCIM
> ...

 

Probably that means that  /etc/xprofile and ~/.xprofile are not being refered to - I think this is a differnce of using a *dm versus startx.

The slowdown with fluxbox - simply put, it is obeying the LC_TYPE. If you use mostly GTK or QT apps, you don't need it. I am not usre if it is the japanese support that slows it down, or the UTF8 support - try using just LC_TYPE="ja_JP" in the .xinitrc. If it speeds up... er... lost train of thought.

You could also make sure fluxbox is using a Unicode font, like those in the link given near the begining. The font changes with the LC_TYPE also, does it not?

-Sud.

----------

## maiku

Actually yes, it does speed up it up when I change it to ja_JP.  However this is probably not best otherwise it would have been included in the HOWTO.  If you don't mind the question what functionality did I lose by changing it besides my Eterm font changing  :Smile: .

I don't think the flux is using a unicode font.   But that I can set no problem.

----------

## Sudrien

My best guess, without examining source code, is that fluxbox and Eterm are trying to get a set that matched the whole Unicode set. GTK+ dows this rater transparently, piecing together the differents sets as best it can. Fluxbox is probably searching for a full font.

Try Arial Unicode, with the ja_JP.UTF8 ... other then that, take it up with the fluxbox people.

-Sud.

----------

## Biggles

I'm having trouble with japanese input in both openoffice and firefox.

Openoffice (not ximian version) doesn't seem to notice the japanese input, just giving me english characters all the time. I set the LC_CTYPE variable but it doesn't sem to make any difference.

Firefox is even worse. It does one of two things seemingly at random with both canna and anthy: The first is it only lets me type english constonants, no vowels, and when I type more than one constonant the second replaces the first, so I can only have one letter at a time. None of the special keys work, only escape. The other is it lets me type in hiragana but none of the special keys work, so I can't convert it to anything else, and backspace doesn't work either.

----------

## Sudrien

 *Biggles wrote:*   

> I'm having trouble with japanese input in both openoffice and firefox.
> 
> Openoffice (not ximian version) doesn't seem to notice the japanese input, just giving me english characters all the time. I set the LC_CTYPE variable but it doesn't sem to make any difference.
> 
> Firefox is even worse. It does one of two things seemingly at random with both canna and anthy: The first is it only lets me type english constonants, no vowels, and when I type more than one constonant the second replaces the first, so I can only have one letter at a time. None of the special keys work, only escape. The other is it lets me type in hiragana but none of the special keys work, so I can't convert it to anything else, and backspace doesn't work either.

 

Openoffice: make sure you have use export LC_CTYPE=* before oowriter and the like. Also, oo.org requires manual configuration of fonts - I believe the program that does this is oopadmin or spadmin. Yet another advantage to using ximian.

Firefox: Er... you are describing standard japanese input. There are several modes to choose from, one represented by the あ in the scim-selector-bar-thing.

Are you in KDE or some other environment? 

"Special Keys"?  I have no idea what keyboard you are using, so this could mean many things.

Have you used japanese input in other evironments before? (Seriously, I'd like to know what your expectations are based off of)

Have you tried it out in somthing simple, like gedit or kwrite?

-Sud.

----------

## Biggles

Sorry about the incoherent post.  :Smile: 

I've used it in gnome-terminal (python wasn't happy about me throwing kanji at it), kedit, anjuta, thunderbird and x-chat. It worked fine in all of them. I think that covers GTK and Qt. I'm using KDE as my enviroment.

I previously used im-ja and canna for japanese input in GTK apps (it still goes now if I set the environment variables right), but I never got that working with Qt apps. (I've also used the windows stuff, if that really matters - it's quite nice.)

When I said "special keys" I was referring to the keys used to do special functions, eg press space to switch between hiragana and various kanji, enter to confirm, etc. In firefox it definitely shows the hiragana 'a' character.

----------

## MrPixel

I have tried repeatedly to follow the instructions above (except I don't need input for any Qt apps (or are Firefox and Thunderbird Qt?), so I skip that part), I but keep getting the same problem: SCIM crashes almost everything I try to run: gedit, Firefox, Thunderbird.  When trying to run from a terminal, this error is generated:

```
*** glibc detected *** free(): invalid pointer: 0x08295f78 ***
```

I use XFCE (4.2), and have ACCEPT_KEYWORDS="~x86" in my make.conf. I also use GDM and only need Japanese input for myself - share the computer with my wife who only needs to read it.  I've tried exporting XMODIFIERS and GTK_IM_MODULE from .xprofile, .xinitrc, and ~/Desktop/Autostart/xfce4.desktop.  I have tried with and without exporting LC_CTYPE. And probably some other things that I can't think of at the moment.  I'd really like to use SCIM, as I really need to be able to input from Firefox and Thunderbird, and I rather dislike GNOME and really dislike KDE (nothing against anyone who loves either of them) - so I don't want to install either of them, but ....

Anyone have any ideas what may be going on, and how I might fix it?

----------

## Sudrien

 *MrPixel wrote:*   

> I have tried repeatedly to follow the instructions above (except I don't need input for any Qt apps (or are Firefox and Thunderbird Qt?), so I skip that part), I but keep getting the same problem: SCIM crashes almost everything I try to run: gedit, Firefox, Thunderbird.  When trying to run from a terminal, this error is generated:
> 
> ```
> *** glibc detected *** free(): invalid pointer: 0x08295f78 ***
> ```
> ...

 

FIRST: ~x86 for a reason.  :Laughing: 

Second: I you are comfortable with keyboard shortcuts, you may wan to try streight UIM-anthy. Remove the GTK_IM_MODULE reference, and issue the following command form the terminal: touch ~/.uim && echo "(define default-im-name 'anthy)" >> ~/.uim.  Restart X. UIM-anthy is now the default. Shift+space toggles the mode. This is the setup I am currently using, but many people like a place to click.  :Rolling Eyes: 

The other alternative is im-ja, in the old HOWTO: https://forums.gentoo.org/viewtopic.php?t=111387 - no support there, though.

Third: liuspider associates with SCIM, and http://www.scim-im.org/about says the version you have is in need of bug reports.

-Sud.

----------

## MrPixel

 *Sudrien wrote:*   

> 
> 
> FIRST: ~x86 for a reason. 
> 
> 

 That makes perfect sense - but I kinda can't live without some of the things it provides (esp. XFCE 4.2)

 *Quote:*   

> Second: I you are comfortable with keyboard shortcuts, you may wan to try streight UIM-anthy. Remove the GTK_IM_MODULE reference, and issue the following command form the terminal: touch ~/.uim && echo "(define default-im-name 'anthy)" >> ~/.uim.  Restart X. UIM-anthy is now the default. Shift+space toggles the mode. This is the setup I am currently using, but many people like a place to click. 
> 
> 

 Perfectly fine with me ... I actually don't like the click interface with im-ja, and found it tedious to switch IMs with the mouse.

However, do I still need SCIM?  Or ??? there's not package called uim-anthy.  Can you point me to a howto or some other resource?

 *Quote:*   

> Third: liuspider associates with SCIM, and http://www.scim-im.org/about says the version you have is in need of bug reports.

 

I just filed a bugreport with them.  Thanks for the pointer.

----------

## Sudrien

 *MrPixel wrote:*   

>  *Sudrien wrote:*   
> 
> Second: I you are comfortable with keyboard shortcuts, you may wan to try streight UIM-anthy. Remove the GTK_IM_MODULE reference, and issue the following command form the terminal: touch ~/.uim && echo "(define default-im-name 'anthy)" >> ~/.uim.  Restart X. UIM-anthy is now the default. Shift+space toggles the mode. This is the setup I am currently using, but many people like a place to click. 
> 
>  Perfectly fine with me ... I actually don't like the click interface with im-ja, and found it tedious to switch IMs with the mouse.
> ...

 

UIM-anthy is built if anthy is present when UIM is emerged. (I thought I already had this shortcut in the howto - will again soon). You can confirm it was built with cat /var/db/pkg/app-i18n/uim-*/CONTENTS | grep anthy

It does not require SCIM, so you can remove anything associated with SCIM in the name.

If UIM is installed, it becomes the default input method for GTK, so there is no GTK_IM_MODULE entry. The touch ~/.uim && echo "(define default-im-name 'anthy)" >> ~/.uim tells it to use anthy by default.

After classes I will try and throw together a quick way of how to set this up from scratch - though thtere should be enough info here to figure this out yourself.

(now if they'd only add that 'anthy' USE flag like I had asked...)

-Sud.

----------

## MrPixel

Ok ... great!

uim-anthy is working with gedit ... does it not work with Firefox or Thunderbird?  I suppose Ctrl+X, Ctrl+V will always work, but is there a way to get it there, too?

----------

## yaneurabeya

 *MrPixel wrote:*   

> Ok ... great!
> 
> uim-anthy is working with gedit ... does it not work with Firefox or Thunderbird?  I suppose Ctrl+X, Ctrl+V will always work, but is there a way to get it there, too?

 

Compile the gtk/gtk2 flags into firefox and thunderbird in order to get gtk input support. Better yet though, just add USE="gtk gtk [...old flags here...]" to your /etc/make.conf file and just run emerge --newuse world. That will solve your input issue.

----------

## Modano

Hum hello all !

Very very nice HOWTO. I successfully, without pain, managed to use the scim-uim in my XFCE4 install. No worry, all Kate, Kedit, etc etc work very well.

Japanese with Firefox is just the same, all runs smoothly.

But two questions :

The export of XMODIFIERS=@im=SCIM and QT_IM_MODULE can be put in /etc/xprofile (for all users), in order to export these variables at X startup. But here, it seems it just ignored the xprofile contents, I still have to export by hand... Any other file I should use ? (xorg, xfce4)...

I exported LC_CTYPE=ja_JA.UTF-8 ans started oowriter...but no way to write Japanese under Normal openoffice 1.1.3 (Asian Languages activated...). It doesn't seem to be a font problem by the way...

(by the way : test : おはよう　ございます。)  :Smile: 

Thanks again for the topic  :Smile: 

----------

## Sudrien

 *Modano wrote:*   

> The export of XMODIFIERS=@im=SCIM and QT_IM_MODULE can be put in /etc/xprofile (for all users), in order to export these variables at X startup. But here, it seems it just ignored the xprofile contents, I still have to export by hand... Any other file I should use ? (xorg, xfce4)...
> 
> I exported LC_CTYPE=ja_JA.UTF-8 ans started oowriter...but no way to write Japanese under Normal openoffice 1.1.3 (Asian Languages activated...). It doesn't seem to be a font problem by the way...
> 
> 

 

/etc/env.d/02locale is a new section, so I'm glad that works for you. Because it works, try the following:

echo 'QT_IM_MODULE=SCIM' >> /etc/env.d/02locale 

echo 'XMODIFIERS=@im=SCIM' >> /etc/env.d/02locale 

Now, from a PM I sent a little while ago:

 *Quote:*   

> Ok, let's try oo.org - I am pretty sure it's a font issue. open up a terminal and run oopadmin - or type "oo" and hit tab. I think it's spelled like that. You should find a button mentioning fonts - all of yours should be in /usr/share/fonts/, up to you to find the right one. Add all it can find, to be safe.
> 
> Then restart oowriter or somthing and test. 

 

And it is ja_JP.UTF-8, not ja_JA.UTF-8. (thought you should try it after you have installed the fonts witout any extra exports)

-Sud.

----------

## Modano

Thanks Sud  :Smile:  I'll clear out that later.

I'm not understanding why Gjiten does not seem to see my attempt to use scim (ctrl+space)...Nothing happens...I can copy/paste from Kiten, which runs well, but no way I can use the IM in gjiten.

I exported GTK_IM_MODULE...but nothing ?

----------

## Modano

Mea Culpa, didn't exported properly the QT/GTK_IM_MODULE environment variables. Thanks a lot to this topic again  :Smile: 

Love testing in gjiten/kiten etc  :Smile:  like a child :p

----------

## Greisby

Cool thread. I have now japanese.

But... dead keys and compose key doesn't work anymore.

Perhaps due to the fact that I have a german keyboard, but skim has only the following menu entries :

  English/Keyboard -> English/European

  English (American) -> M17N-en-ispell

  Japanese -> lots of entries

  Other -> unicode & raw code

  Keyboard

Any clue why I don't have a German entry?

Here is my .xprofile :

```
export XPSERVERLIST="`/bin/sh /usr/sbin/xprint get_xpserverlist`"

export XMODIFIERS=@im=SCIM

export GTK_IM_MODULE=scim

export QT_IM_SWITCHER=imsw-multi

export QT_IM_MODULE=scim
```

Here my .xinitrc :

```
export LANG="en_US.UTF-8"

export LC_CTYPE="en_US.UTF-8"
```

Extract from xorg.conf:

```
Section "InputDevice"

        Identifier  "Keyboard[0]"

        Driver      "kbd"

        Option      "Vendor"     "Dell"

        Option      "Name"       "Dell Keyboard"

        Option      "XkbLayout"  "de"

        Option      "XkbModel"   "pc105"

        Option      "XkbOptions" "compose:rwin"

        Option      "AutoRepeat" "500 5"

EndSection
```

And in KDE I have 

  -keyboard layout set to German with basic layout

  -xkb options:

    +Compose

    +Right win key is compose

----------

## Sudrien

 *Greisby wrote:*   

> Cool thread. I have now japanese.
> 
> But... dead keys and compose key doesn't work anymore.
> 
> Perhaps due to the fact that I have a german keyboard, but skim has only the following menu entries :
> ...

 

Plain old "Keyboard" should work just fine for your dead keys. It could be labeled "Raw input", but more prople understand "Keyboard".  :Razz: 

A suggestion: remove the xinitrc lines:

export LANG="en_US.UTF-8"

export LC_CTYPE="en_US.UTF-8"

make a file called /etc/env.d/02locale

and put the following lines in it:

LANG="en_US.UTF-8"

LC_CTYPE="de_DE.UTF-8"

then etc-update and restart X.

This might help with the keyboard without changing your language - if not, change the /etc/env.d/02locale's LC_CTYPE back to American English. 

(the oft confused) -Sud.

----------

## Greisby

Ok thanks. I'll try that tuesday.

----------

## maiku

 *Sudrien wrote:*   

> make a file called /etc/env.d/02locale
> 
> and put the following lines in it:
> 
> LANG="en_US.UTF-8"
> ...

 Where did you get the 02 in 02locale, if I may ask.

----------

## yaneurabeya

 *maiku wrote:*   

>  *Sudrien wrote:*   make a file called /etc/env.d/02locale
> 
> and put the following lines in it:
> 
> LANG="en_US.UTF-8"
> ...

 

If you try that and run emerge you'll get errors =\...

----------

## maiku

I am getting no errors.  What can I do to cause them?

----------

## yaneurabeya

Well, for instance I get errors if I run emerge -uD world.

----------

## maiku

Goes on without a hitch for me.  /etc/env.d/02locales says *Quote:*   

> LANG="en_US.UTF-8"
> 
> LC_CTYPE="ja_JP.UTF-8"
> 
> 

 I can't understand why you would have an error then.  What is your language?

----------

## yaneurabeya

I'll try that again once I get back. It had to do with the SCIM lines most likely.

----------

## Greisby

 *Quote:*   

> A suggestion: remove the xinitrc lines: 
> 
>  export LANG="en_US.UTF-8" 
> 
>  export LC_CTYPE="en_US.UTF-8" 
> ...

 

Hi back!

I'm sorry, I was terribly busy - reboot was not possible  :Question:   :Question:   :Question: 

Well, it did or didn't change anything (not sure, since I did a -u world).

It works half. I explain:

-I have scim working with qt apps, like firefox.

-It doesn't work with kde apps.

-But I got my deadkeys back  :Smile: 

For KDE apps:

-I can choose the input method, but it doesn't affect the input...

-I have 3 IM choices in the "Select Input Method" contextual menu:

  1. Simple composing input method

  2. XIM

  3. scim

I tried them all - none of them did work.

----------

## Greisby

Well.... I will ask on the chinese forum here

----------

## yaneurabeya

Hey Sud, what's your exact .uim conf file and how do you switch between raw input and Japanese input using straight uim? I wanted to give straight uim a try since I don't really use the scim frontend at all...

----------

## Sudrien

 *yaneurabeya wrote:*   

> Hey Sud, what's your exact .uim conf file and how do you switch between raw input and Japanese input using straight uim? I wanted to give straight uim a try since I don't really use the scim frontend at all...

 

My ~/.uim - verbatim - 

```
(define default-im-name 'anthy)

```

The default way to switch is using [shift]+[space], which can occasionally be activated without knowing it -esp. for a sloppy typist like myself. There is a way to change this, adding a line in your ~/.uim, but I can't recall it at the moment.

-Sud.

----------

## yaneurabeya

Hmmmm... thanks for the info. I thought that it was just a joke or something when you wrote down the ~/.uim file contents because it seemed like an (insert your config here) type directive  :Smile: .

----------

## Sudrien

*shouts* UPDATE! 

Now with more font information. 

-Sud.

----------

## G2k

fluxbox takes a good 15 seconds to start now that i've followed this guide...why is that?

Also, I installed the Arial Unicode MS font but I'm having a hard time letting Firefox use it. How do I do this?

----------

## yaneurabeya

I appreciate the sediment and thought Sud, but everything works nicely without Arial, so I'll stay away from as many things associated with Microsoft in Linux >_>... At least that seems to increase my stability =\... *curses some Wine programs*

----------

## Sudrien

 *G2k wrote:*   

> fluxbox takes a good 15 seconds to start now that i've followed this guide...why is that?
> 
> Also, I installed the Arial Unicode MS font but I'm having a hard time letting Firefox use it. How do I do this?

 

1. Because Fluxbox is now trying to patch together a full unicode font, which you default font probably is not (as I understand it). You could try adding  x11-wm/fluxbox -nls to your /etc/portage/packages.use, and recompile. That might stop it, but I'm not sure.

2. See Preferences >> General >> Fonts & colors >> Fonts for: Japanese.

yaneurabeya: I respectfully disagree that everything Microsoft... wait? Wine? Traitor!  :Wink: 

-Sudrien

----------

## yaneurabeya

Lol. It's not by choice but for necessity *sighs for the lack of decent electrical engineering Linux based programs*.

Lucky... on summer break already? I envy you  :Sad: .

----------

## mjg123

Thanks for writing such a useful howto - I am having one quite serious problem though, after having followed it:  I cannot log into KDE as any user other than root.  Once logged in as root, everything works fine (typing in kana/kanji etc), but when I try to log in to KDE as a mortal user, it stalls at the 2nd of the 7 stages (initializing system), and dropping into a console to look at 'top' shows that 'xrdb' is using 99.9% of processor and seems to be stuck.  Has anyone any suggestions?  I'd be very grateful for any help.

update:  etc-update fixed this, but I'll leave it here in case anyone else is as silly as me...

--mjg123

----------

## mholtz

Okay:

I have had im-ja working as described in the other thread for nearly a year, but I would like to give this method a try.

I went through the procedure outlined.  When I open up gedit, I can select Japanese input, but nothing but english characters come out -- no hiragana or katakana.  Luckily, I can still switch back to im-ja by changing GTK_IM_MODULE.

I am also confused in general between all these packages!  Could someone lay it out for me?  What do I need?  Right now, I have the following installed:

canna

kinput2

freewnn

anthy

uim

scim

scim-uim

skim

skk

Surely with all these packages, I can make something work.  But what are the absolute essentials?

Thanks.

EDIT: Well, I think I figured part of it out -- I was still attempting to change using im-ja.  But how do I prevent im-ja from running other than killing the process?  And where is the tray icon for scim?

----------

## yaneurabeya

mholtz,

    You should only need anthy and scim-uim. scim will be emerged along with scim-uim. Other than that your list is somewhat redundant and some programs are unnecessary. Now, that's for having a scim window open for configuring. If you only want an input manager and need to switch between Japanese and English say without a graphical input window, then use uim-anthy (?). I'm trying to remember since my system with Japanese support took a nosedive.

    But yeah... just add the scim/uim-anthy invocation to your .xprofile or .xinitrc file and you should be good. And eliminate all refs to im-ja. It's unneeded.

    Note: Turning on the uim applet is simple. Just do shift-space. Unlike im-ja it doesn't have an 'input in progress' character, so you won't know till you start typing characters if uim is on or not.

----------

## saintpa

Hi,

I did exactly what the howto says. Everything works as expected. However, I am now experiencing very slow load time for a lot of applications: firefox, thunderbird, etc. Gaim loads fast, but freezes for ~15 seconds when I try to open the first chat window.

Another thing that I noticed is that when I launch gaim from a command line, scim doesn't get loaded immediately. It only gets loaded when I first open a chat window, or when I shut down gaim.

Does anyone have a clue what's going on here? I'm using both KDE and icewm.

thanks in advance,

jz

----------

## liuspider

did you try to re-emerge all scim-* package after you upgrade scim?

----------

## liuspider

what's the version of all scim related packages you installed?

----------

## yaneurabeya

Note: on some system setups SCIM causes more trouble than it's worth, so if you just want Japanese input, consider using straight UIM.

----------

## liuspider

as a developer of SCIM, your Note seems to me not so friendly/helpful

----------

## yaneurabeya

Sorry  :Sad: . It's just that SCIM unfortunately has a tendency to crash some GTK programs like vmware, for example. If you can find the bugs and fix them it would be very appreciated by many.

----------

## G2k

liuspider: well, in a way yaneurabeya's suggestion was productive since it was not meant as an offense.

This is starting to get annoying all GTK+ apps are taking a while to load and fluxbox, as mentioned above, takes forever to open...I'm considering to get rid of these 'features'.  :Crying or Very sad:  Sometimes I wonder why MS is able to make things Just Work (TM)

----------

## yaneurabeya

 *G2k wrote:*   

> Sometimes I wonder why MS is able to make things Just Work (TM)

 

Maybe it's because they force everyone to basically use a set interface? That's just the Microsoft/Apple way  :Sad: ...

----------

## liuspider

that's largely caused by incompatible C++ ABI, which beyond our control

but if anything app has a problem with the gtk im module, you can just use xim im module, details

MOD EDIT: Added bbCode tags for that URL of yours. Please use them, especially for long addresses, they break the page layout... --plate

----------

## yaneurabeya

Really? glibc reports a bunch of errant free() errors, so it looks like a few malloc() / free() pair of calls gone bad. Might be something completely out of the SCIM dev's control though...

----------

## lo-jay

 :Confused:   o.k.

did set up scim & the locales on my (non kde ) system.

when i try to start scim from a console i get

 *Quote:*   

> (scim-panel-gtk:8959):Gtk-WARNING **: Locale not supported by C library.
> 
> Using the fallback 'C' locale.

 

and don't get it running.

what am i missing?

thanks again!

----------

## yaneurabeya

Prolly have to add the locale to the locales file somewhere in the /etc folder (I forget where exactly) and recompile glibc and all related programs since you used the userlocales USE flag with glibc and had a shortened (deleted Japanese locale codes) locales list from the default.

----------

## lo-jay

well, my locales look like this now

```
LANG=de_DE.UTF-8

LC_CTYPE=zh_CN.UFT-8

LC_NUMERIC="de_DE.UTF-8"

LC_TIME="de_DE.UTF-8"

LC_COLLATE="de_DE.UTF-8"

LC_MONETARY="de_DE.UTF-8"

LC_MESSAGES="de_DE.UTF-8"

LC_PAPER="de_DE.UTF-8"

LC_NAME="de_DE.UTF-8"

LC_ADDRESS="de_DE.UTF-8"

LC_TELEPHONE="de_DE.UTF-8"

LC_MEASUREMENT="de_DE.UTF-8"

LC_IDENTIFICATION="de_DE.UTF-8"

LC_ALL=
```

still scim doesn't work:

```
(scim-panel-gtk:8964):Gtk-WARNING **: Locale not supported by Xlib

(scim-panel-gtk:8964):Gtk-WARNING **: cannot set locale modifiers
```

thanks again

----------

## liuspider

please consult this

btw: as you are trying to use Chinese, you may want to post in the Chinese forum

----------

## lo-jay

i did follow this wiki, but no success till now.

but you're right, will move to the chinese forum.

thanks!

----------

## yaneurabeya

You mistyped your locales...

```

LANG=de_DE.UTF-8

LC_CTYPE=zh_CN.UFT-8 # Make this LC_CTYPE=zh_CN.UTF-8

LC_NUMERIC="de_DE.UTF-8"

LC_TIME="de_DE.UTF-8"

LC_COLLATE="de_DE.UTF-8"

LC_MONETARY="de_DE.UTF-8"

LC_MESSAGES="de_DE.UTF-8"

LC_PAPER="de_DE.UTF-8"

LC_NAME="de_DE.UTF-8"

LC_ADDRESS="de_DE.UTF-8"

LC_TELEPHONE="de_DE.UTF-8"

LC_MEASUREMENT="de_DE.UTF-8"

LC_IDENTIFICATION="de_DE.UTF-8"

LC_ALL=

```

----------

## valuial

Hi there.

I tried to install skim and the like on my own, and during the process (I used some Versions not yet in portage) got the thing working when starting scim manually... So I tried to configure my system to start the necessary things automatically ... and failed.

After cleaning my system from my futile attemps I tried it following this howto.

It works with firefox. But not with kwrite for example (haven't tested too many apps but kde-apps as well as a certain qt-app were not successful).

my /etc/env.d/02locale:

```
LANG=de_DE

LC_CTYPE=ja_JP.UTF-8
```

as well as my /etc/xprofile:

```
export XMODIFIERS=@im=SCIM

export GTK_IM_MODULE=scim

export QT_IM_MODULE=scim
```

Any suggestions?

V.

----------

## yaneurabeya

You forgot that you have to recompile QT to get Japanese support  :Smile: ?

----------

## valuial

I did

```
emerge world --newuse -av
```

... Qt was recompiled as I remember... Useflags as stated in this howto...

----------

## fctk

I read the Japanese fonts' related part (I'm not interested in input, I just want to see japanese text in firefox  :Laughing:  ) so... do I need to recompile everything with the cjk use flag?

----------

## G2k

I think that if you follow this guide you should be pretty much set. And you should emerge a couple of Japanese fonts just in case.

P.S.

Mi sono accorto che sei Italiano dopo aver scritto il post.  :Wink: 

----------

## yaneurabeya

All you really need is the nls (non-Latin script I believe) flag and the cjk/unicode flags, plus the proper locale setup. The rest is just extra fluff for 'improved' interfacing for the user.

All I can say is that I love my Mac's Japanese input system  :Smile: .

----------

## kimchi_sg

 *yaneurabeya wrote:*   

> ... nls (non-Latin script I believe) ...

 

Wrong! nls stands for Native Language Support. it enables apps to show output in whatever language you set as your "native language", and not just plain old English.

----------

## fctk

 *yaneurabeya wrote:*   

> All you really need is the nls (non-Latin script I believe) flag and the cjk/unicode flags, plus the proper locale setup. The rest is just extra fluff for 'improved' interfacing for the user.

 

so i need the cjk use flag? but even without it i'm able to see japanese/chinese etc... with firefox quite well...  :Confused: 

----------

## yaneurabeya

 *kimchi_sg wrote:*   

>  *yaneurabeya wrote:*   ... nls (non-Latin script I believe) ... 
> 
> Wrong! nls stands for Native Language Support. it enables apps to show output in whatever language you set as your "native language", and not just plain old English.

 

Ah yes... oops  :Embarassed: .

cjk and a lot of the other flags/libs listed on the first page are only needed for writing as you can just install a font (kochi-substitute is the name I believe-see the beginning of the webpage for more details) without having to go through the process of recompiling/installing a bunch more libs.

----------

## fctk

k... so no need to recompile. i suggest to revise the layout of the first post...  :Smile:  it would be even better to copy this howto on gentoo-wiki if it isn't already there...  :Smile: 

----------

## valuial

Writing my last Mail I came upon another curious behaviour:

KMail as well as KEdit, but not KWrite have an context menu to select an Input Method.

Whenever I select XIM the japanese input works (I even can select keyboard, UIM-anthy etc. using the skim taskbar tool),

but when I select "simple composing input method" I only get the latin writing.

Any sugesstions to get scim working?

-V-

PS: I did recompile qt as suggested above.

 *valuial wrote:*   

> 
> 
> my /etc/env.d/02locale:
> 
> ```
> ...

 

----------

## frostschutz

Thanks for this HOWTO. Input seems to work somehow (although I haven't yet figured out when/why that scim button keeps (dis)appearing randomly). However, I can't get it to work together with xterm properly. Does any of you use Japanese / UTF8 in xterm?

My xterm detects multi-byte characters correctly and all, but it just prints an empty box instead of the actual letter. So I guess it's a font issue. So I tried changing the font to "Arial Unicode MS" or to "Bitstream Cyberbit" (some of the fonts that I think are used by and work well in Firefox).

This works only partially, meaning: The Japanese letters are displayed correctly, but there are many side effects (bad redrawing of letters; big spaces between normal roman letters; etc.) that make it unusable.  :Crying or Very sad: 

Does any of you have a terminal emulator configuration that displays normal text and japanese perfectly

EDIT: Got it working in xterm and urxvt, with these settings. I think the important ones are utf8 and font. The fonts have to be installed, I guess (I just emerged all fonts portage had to offer).

```

!!! XTERM SETTINGS !!!

XTerm*locale:           true

XTerm*scrollBar:        true

XTerm*background:       black

XTerm*foreground:       white

XTerm*cursorColor:      yellow

XTerm*scrollTtyOutput:  false

XTerm*scrollKey:        true

XTerm*loginShell:       true

XTerm*utf8:             1

XTerm*VT100*font:       -Misc-Fixed-Medium-R-Normal--18-120-100-100-C-90-ISO10646-1

XTerm*VT100*wideFont:   -Misc-Fixed-Medium-R-Normal-ja-18-120-100-100-C-180-ISO10646-1

XTerm*multiScroll:      true

XTerm*saveLines:        4096

!!! RXVT-UNICODE SETTINGS !!!

URxvt*background:       black

URxvt*foreground:       white

URxvt*font:             -Misc-Fixed-Medium-R-Normal--18-120-100-100-C-90-ISO10646-1,\

                        -Misc-Fixed-Medium-R-Normal-ja-18-120-100-100-C-180-ISO10646-1

URxvt*saveLines:        4096

```

----------

## branana

Guys, I have followed the guide. I think I have problems with the /etc/xprofile part. Because when I do startx, xprofile doesn't seem to be checked. echo $GTK_IM_MODULE does nothing.

I use startx to get into xfce4 4.2. I don't use Gnome or KDE.

When I try something like, gaim, typing a new message. The SCIM icon does not automatically come up in the tray. If I manually start "scim" from terminal, it comes up in the tray but I cannot left-click it to select any input methods or anything. Please help!!

----------

## frostschutz

I don't have a /etc/xprofile either - if I remember correctly, it works only with a certain window / login manager (kde/kdm or gnome, I don't remember). Anyway, I'm using xdm and fluxbox; to make things work, I just put the stuff into my home profile and load it in ~/.fluxbox/startup.

Also, after following the guide, for some strange reason not all scim input modules were installed, and scim didn't work with kate. So I manually emerged /usr/portage/app-i18n/scim* (filtering out the masked packages), which solved the problem. I guess I'm missing a kde use flag or something that caused it not to be installed properly in the first place. (I have kde installed for a couple of kde apps like kate or kmail only).

----------

## eealex

 *branana wrote:*   

> Guys, I have followed the guide. I think I have problems with the /etc/xprofile part. Because when I do startx, xprofile doesn't seem to be checked. echo $GTK_IM_MODULE does nothing.
> 
> I use startx to get into xfce4 4.2. I don't use Gnome or KDE.
> 
> When I try something like, gaim, typing a new message. The SCIM icon does not automatically come up in the tray. If I manually start "scim" from terminal, it comes up in the tray but I cannot left-click it to select any input methods or anything. Please help!!

 

Hi Branana,  

I am also using XFCE4.2.  I didn't read much about this thread but I put my scim related stuff in my ~/.xinitrc

```
alex@eealex ~ $ cat .xinitrc

export LANG="ja_JP.UTF-8"

export XMODIFIERS="@im=SCIM"

export GTK_IM_MODULE=scim

scim -d -f x11

xfce-mcs-manager

xfwm4 --daemon

xftaskbar4 &

xfdesktop &

xbindkeys &

exec xfce4-panel

```

Hope useful for you.

----------

## brjames

I have the same problem as valuial... 

As far as i know everything has been recompiled and what not, but skim (or scim or whatever) just doesnt work with most kde programs.  Cntrl-Space does nothing... Left click on the skim icon does nothing until i input into a gtk program... 

Has anybody gotten skim to work completely with KDE?

----------

## brjames

OMFG!!!! I am so pissed at what the solution is...

If anybody else is having the same problem as me or visualize, the solution is the following:

```
emerge -vp scim-qtimm
```

Obviously, the procedure by suderian on the first page worked at some point, so apparently some developer decided to remove scim-qtimm as a dependency of either skim or qt with qtimm use flag enabled... there might be a good reason for that, but im still kinda irritated that ive spend days trying to get this thing working when the only problem was a stupid missing dependency.

Anyway, Suderian if you could please update the front page... I did a text search on the first page so I didnt just miss it (my that would be embarrassing).

----------

## frostschutz

I don't know what happened, but after an emerge world update, the Japanese support I had working is suddenly gone. Scim shows up as usual, but I can only select English/European or Raw Input. Support for Japanese language is gone completely.

What can have gone wrong? How do I get Japanese back?!  :Confused: 

----------

## eealex

Try emerge again the scim-anthy or scim-uim (which you have installed). 

I have had a similar problem before.

----------

## frostschutz

Okay, it looks like I overdid it a little with the re-emerging. Now I can not only input 日本語, but over 20 other languages as well, some of which I never heard of before. The language selection menu takes like half the screen when I click on it. Talk about crazy.  :Wink:  Still, I wonder what broke it in the first place. I'll keep an eye on my emerge log should it ever happen again...

Thank you!  :Very Happy: 

----------

## yaneurabeya

Run SCIM's config to eliminate the unnecessary languages for input at least.

----------

## jettjunker

I ran into a wall pretty early, when I try emerge world --newuse I get: 

```
Calculating world dependencies ...done!

>>> emerge (1 of 8) dev-python/wxpython-2.4.2.4-r2 to /

>>> md5 files   ;-) wxpython-2.4.2.4-r2.ebuild

>>> md5 files   ;-) wxpython-2.6.0.0-r1.ebuild

>>> md5 files   ;-) wxpython-2.6.1.0.ebuild

>>> md5 files   ;-) wxpython-2.4.2.4.ebuild

>>> md5 files   ;-) files/wxversion.py

>>> md5 files   ;-) files/scripts-multiver-2.6.1.0.diff

>>> md5 files   ;-) files/digest-wxpython-2.4.2.4

>>> md5 files   ;-) files/digest-wxpython-2.6.1.0

>>> md5 files   ;-) files/wxpy-config.py

>>> md5 files   ;-) files/scripts-multiver-2.6.0.0.diff

>>> md5 files   ;-) files/digest-wxpython-2.4.2.4-r2

>>> md5 files   ;-) files/digest-wxpython-2.6.0.0-r1

>>> md5 src_uri ;-) wxPythonSrc-2.4.2.4.tar.gz

>>> Unpacking source...

>>> Unpacking wxPythonSrc-2.4.2.4.tar.gz to /var/tmp/portage/wxpython-2.4.2.4-r2/work

>>> Source unpacked.

!!! set-wxconfig: Error:  Can't find normal or debug version:

!!! set-wxconfig:         /usr/bin/wxgtk2u-2.4-config not found

!!! set-wxconfig:         /usr/bin/wxgtk2ud-2.4-config not found

!!! You need to emerge wxGTK with unicode in your USE

```

Well, there were 10 things but the first two went through fine.

I put unicode in my make.conf, as instructed, and re-emerged wxGTK.  I even tried USE="unicode" emerge wxGTK to no avail.

Oh, and I am using gnome

PS: I'm more after Greek and German than Japanese (though I do sorta want it too), I can get those working through the same stuff, right?

----------

## frostschutz

Greek, yes. German, I don't know. When I select "English/Keyboard" in SCIM, I actually get my default layout (which is already in German). So I never tried typing umlauts using scim...

----------

## valuial

To write German umlauts, just set youre Keyboard layout with the Gnome utility (I'm no Gnomer, so I don't know how it is called). I switch between English layout and German layout using the KDE Keyboard Tool, an icon in the task tray...

English/Keyboard only disables the scim engine...

Could be the same with greek, too.

----------

## frostschutz

Must be annoying for a foreigner having to learn german keyboard layout. I know it took me a long time fiddling about finding the keys for us keyboard. The letters are the same execpt switched Y/Z, but everything else is different. It'd probably be easier to just bind the umlauts somewhere.

----------

## Sudrien

 *brjames wrote:*   

> Anyway, Suderian if you could please update the front page... I did a text search on the first page so I didnt just miss it (my that would be embarrassing).

 

Sure, burinnjames   :Rolling Eyes: 

Seriously, I have a prefence for gtk, but will test this when I can. A placeholder note is up for now.

Should probably make a disclaimer for the Unicode tag and Wx* - I have run into problems there before.

Due to PMs and IMs I've gotten, I'm thinking of a partial rewrite... too many times of not quite knowing if it is UIM or SCIM that is the problem.

At that point I'll make a wiki copy, with the usual 'this info may be old' disclaimer. http://gentoo-wiki.com has the request, anyways. 

-Sud.

17672 hits !?! I hope most of those aren't people with trouble...

----------

## jettjunker

Cool, thanks for the info.  German works just great using the gnome keyboard utility, since it only needs an extra 7 letters.  The greek doesn't really work, since it needs major accent support. 

 I did, however, find Thessalonica, which works great for my purposes (only need greek for oowriter). you will need java jdk and jre.  I had problems with the blackdown one (so unmerged it), but sun worked fine once i set it as default java jdk and re-emerged openoffice-ximian with java in the USE.  I don't know if the re-emerge was necessary (or the USE flag), but that got around problems I was having before. (jvmsetup missing, or simply not saving)

Sorry that is a bit off topic, but I figured I would post the info for anyone who comes here from a search.

----------

## Jenden

Ok, I've gotten SCIM working for firefox, gaim, gedit, and xterm, but for the life of me I can't get it to work in Open Office.  I'm running openoffice-bin 2.0.0 and put the following in my .xprofile:

```
LC_CTYPE=ja_JP.UTF-8

export GTK_IM_MODULE=scim

export XMODIFIERS=@im=SCIM

```

I actually had scim working at one point in OO, but the enxt time I opened it up it wasnt' wroking anymore.... so I know I've got everything somewhere, its just gotta be a setting somewhere I'm missing.

----------

## lo-jay

got scim / skim-1.41 installed, got the little icon, but can't launch it with crt  space -

how's that  :Question: 

my .xinitrc looks like this

```

export XMODIFIERS=@im=SCIM

export GTK_IM_MODULE=scim

export QT_IM_MODULE=scim

export LC_CTYPE="zh_CN.GBK"

 skim -d
```

thanks!

----------

## melange

 *MrPixel wrote:*   

> I have tried repeatedly to follow the instructions above (except I don't need input for any Qt apps (or are Firefox and Thunderbird Qt?), so I skip that part), I but keep getting the same problem: SCIM crashes almost everything I try to run: gedit, Firefox, Thunderbird.  When trying to run from a terminal, this error is generated:
> 
> ```
> *** glibc detected *** free(): invalid pointer: 0x08295f78 ***
> ```
> ...

 

I also have this problem   :Sad: 

does anyone know how to fix it?

NB: I'm don't have ACCEPT_KEYWORDS="~x86" in my make.conf !

----------

## NebuK

hi guys ...

this guide helped my very much ... thanks alot  :Razz: 

but i stil have 2 little problems ... whereas one has almost nothing to do with scim i assume.

the first thing is that whenever i start a urxvt or uxterm or whatever terminal with LANG=ja_JP.UTF-8 and LC_ALL=ja_JP.UTF-8 the startup takes about 40 seconds to one minute. this is rahter getting on your nerves with the time  :Razz:  i tried around a bit and figured out what it is ...

```

read(5, "\1\242\0\332\0\0\0\17\0\1\371\371\377\377\377\377\20&\247"..., 32) = 32

readv(5, [{"8-misc-fixed-bold-r-normal--13-1"..., 60}, {"", 0}], 2) = 60

writev(5, [{"1\1\0\v\0\1\0#", 8}, {"-*-*-*-R-*-*-13-*-*-*-*-*-ISO885"..., 35}, {"\0", 1}], 3) = 44

read(5, "\1\242\0\333\0\0\0\17\0\1\371\371\377\377\377\377\20&\247"..., 32) = 32

readv(5, [{"8-misc-fixed-bold-r-normal--13-1"..., 60}, {"", 0}], 2) = 60

writev(5, [{"1\1\0\v\0\1\0#", 8}, {"-*-*-*-R-*-*-13-*-*-*-*-*-ISO885"..., 35}, {"\0", 1}], 3) = 44

read(5, "\1\242\0\334\0\0\0\17\0\1\371\371\377\377\377\377\20&\247"..., 32) = 32

readv(5, [{"8-misc-fixed-bold-r-normal--13-1"..., 60}, {"", 0}], 2) = 60

writev(5, [{"1\1\0\r\0\1\0)", 8}, {"-*-*-*-R-*-*-13-*-*-*-*-*-JISX02"..., 41}, {"\0\0\0", 3}], 3) = 52

read(5, "\1\242\0\335\0\0\0\22\0\1\371\371\377\377\377\377\20&\247"..., 32) = 32

readv(5, [{"D-misc-kochi gothic-medium-r-nor"..., 72}, {"", 0}], 2) = 72

writev(5, [{"1\1\0\f\0\1\0(", 8}, {"-*-*-*-R-*-*-13-*-*-*-*-*-KSC560"..., 40}], 2) = 48

read(5, 0x7ffe6d50, 32)                 = -1 EAGAIN (Resource temporarily unavailable)

select(6, [5], NULL, NULL, NULL)        = 1 (in [5])

read(5, "\1\242\0\336\0\0\0\0\0\0\371\371\377\377\377\377\20&\247"..., 32) = 32

writev(5, [{"1\1\0\f\0\1\0(", 8}, {"-*-*-*-R-*-*-14-*-*-*-*-*-KSC560"..., 40}], 2) = 48

read(5, 0x7ffe6d50, 32)                 = -1 EAGAIN (Resource temporarily unavailable)

select(6, [5], NULL, NULL, NULL)        = 1 (in [5])

read(5, "\1\242\0\337\0\0\0\0\0\0\371\371\377\377\377\377\20&\247"..., 32) = 32

writev(5, [{"1\1\0\f\0\1\0(", 8}, {"-*-*-*-R-*-*-12-*-*-*-*-*-KSC560"..., 40}], 2) = 48

read(5, 0x7ffe6d50, 32)                 = -1 EAGAIN (Resource temporarily unavailable)

select(6, [5], NULL, NULL, NULL)        = 1 (in [5])

read(5, "\1\242\0\340\0\0\0\0\0\0\0\214\0\0\0\6\20\'5\370\0\0\2"..., 32) = 32

writev(5, [{"1\1\0\f\0\1\0(", 8}, {"-*-*-*-R-*-*-11-*-*-*-*-*-KSC560"..., 40}], 2) = 48

read(5, 0x7ffe6d50, 32)                 = -1 EAGAIN (Resource temporarily unavailable)

select(6, [5], NULL, NULL, NULL)        = 1 (in [5])

read(5, "\1&\0\341\0\0\0\0\0\0\376t\0\0\0\6\20\'5\370\0\0\2\324"..., 32) = 32

writev(5, [{"1\1\0\f\0\1\0(", 8}, {"-*-*-*-R-*-*-15-*-*-*-*-*-KSC560"..., 40}], 2) = 48

read(5, 0x7ffe6d50, 32)                 = -1 EAGAIN (Resource temporarily unavailable)

select(6, [5], NULL, NULL, NULL)        = 1 (in [5])

read(5, "\1\377\0\342\0\0\0\0\0\0\371\371\377\377\377\377\20&\247"..., 32) = 32

writev(5, [{"1\1\0\6\0\1\0\20", 8}, {"*-KSC5601.1987-0", 16}], 2) = 24

read(5, 0x7ffe6d50, 32)                 = -1 EAGAIN (Resource temporarily unavailable)

select(6, [5], NULL, NULL, NULL)        = 1 (in [5])

read(5, "\1&\0\343\0\0\0\0\0\0\376t\0\0\0\6\20\'5\370\0\0\2\324"..., 32) = 32

writev(5, [{"1\1\0\7\0\1\0\22", 8}, {"*-*-KSC5601.1987-0", 18}, {"\0\0", 2}], 3) = 28

read(5, 0x7ffe6d50, 32)                 = -1 EAGAIN (Resource temporarily unavailable)

select(6, [5], NULL, NULL, NULL)        = 1 (in [5])

read(5, "\1&\0\344\0\0\0\0\0\0\0\300\0\0\0\6\20\'5\370\0\0\2\324"..., 32) = 32

writev(5, [{"1\1\0\7\0\1\0\24", 8}, {"*-*-*-KSC5601.1987-0", 20}], 2) = 28

read(5, 0x7ffe6d50, 32)                 = -1 EAGAIN (Resource temporarily unavailable)

select(6, [5], NULL, NULL, NULL)        = 1 (in [5])

read(5, "\1\377\0\345\0\0\0\0\0\0\371\371\377\377\377\377\20&\247"..., 32) = 32

writev(5, [{"1\1\0\10\0\1\0\26", 8}, {"*-*-*-*-KSC5601.1987-0", 22}, {"\0\0", 2}], 3) = 32

read(5, 0x7ffe6d50, 32)                 = -1 EAGAIN (Resource temporarily unavailable)

select(6, [5], NULL, NULL, NULL)        = 1 (in [5])

read(5, "\1&\0\346\0\0\0\0\0\0\376x\0\0\0\6\20\'5\370\0\0\2\377"..., 32) = 32

writev(5, [{"1\1\0\10\0\1\0\30", 8}, {"*-*-*-*-*-KSC5601.1987-0", 24}], 2) = 32

read(5, 0x7ffe6d50, 32)                 = -1 EAGAIN (Resource temporarily unavailable)

select(6, [5], NULL, NULL, NULL <unfinished ...>

```

urxvt seems to brute-force checking which fonts are available and which arent ... what do i have to install or disable so urxvt starts instantly?  :Sad: 

the other - more unimportant - thing is firefox ... in firefox the fonts became really really small if you start ff with LANG and LC_ALL set to ja_JP.UTF-8 ... not a major issue, but its getting on ones eyes  :Razz: 

well ... it would be really really nice if you could help me  :Razz: 

also sorry for my crappy english ... german fellow and its already a bit too late for writing good english  :Razz:  please forgive me.

thanks for reading  :Razz: , and again thanks for the great guide  :Razz: 

----------

## BillyD

Hi NebuK,

I have no idea about your issues with urxvt, but I might have a suggestion that could help your Firefox problems (might not too  :Wink:  ).  Have you tried setting the font size to something larger under Edit>Preferences>General>Fonts & Colours?  Perhaps that will fix your issue.

----------

## NebuK

thats the strange thing with firefox ... simply setting the fontsize to something higher doesnt work. it works for the content - but not for menus, etc. ... it seems like theres no setting affecting the menu font size  :Sad: 

ive also looked through about:config - maybe i'm just blind, but i didnt find anything  :Sad: 

btw: the font thing became even more strange ... ive tried around a bit, and realized, that the "slow startup" happens with every .UTF-8 LANG/LC_ALL ... i just dont understand it :/

also ive tried to set the font paths (/usr/share/fonts/kochi-substitute, mika-chan and jisx0239(or some other number - forgot)) both in xorg.conf and /etc/X11/fs/cofig ... no luck with that one  :Sad: 

----------

## Biggles

So, 10 months and a fresh install of Gentoo later, Japanese input doesn't go. I select anthy or canna for the input method, start typing in a GTK app, and all I get is the english characters. KDE apps don't even let me change input methods.

Here's my .xprofile file:

```
export XMODIFIERS=@im=SCIM

export GTK_IM_MODULE=scim

export QT_IM_MODULE=scim

export LANG=en_NZ.UTF-8

export LC_CTYPE=ja_JP.UTF-8
```

I'm wondering if it's not picking up the correct font somehow. I use Bitstream Vera Sans as default everywhere, and I know that doesn't have the required characters, but it should pick up kochi-substitute when I switch to Japanese input, at least that's what it did on my old Gentoo install.

----------

## AmosMutke

 *Biggles wrote:*   

> So, 10 months and a fresh install of Gentoo later, Japanese input doesn't go. I select anthy or canna for the input method, start typing in a GTK app, and all I get is the english characters. KDE apps don't even let me change input methods.
> 
> 

 

I'm assuming you have followed the HOWTO and have all the correct software installed, but can you provide more info.

what does "locale" dispaly

here's mine

```
 me> locale

LANG=en_US.UTF-8

LC_CTYPE=ja_JP.utf8

LC_NUMERIC="en_US.UTF-8"

LC_TIME="en_US.UTF-8"

LC_COLLATE="en_US.UTF-8"

LC_MONETARY="en_US.UTF-8"

LC_MESSAGES="en_US.UTF-8"

LC_PAPER="en_US.UTF-8"

LC_NAME="en_US.UTF-8"

LC_ADDRESS="en_US.UTF-8"

LC_TELEPHONE="en_US.UTF-8"

LC_MEASUREMENT="en_US.UTF-8"

LC_IDENTIFICATION="en_US.UTF-8"

LC_ALL=

```

what USE variables did you have set when you emerged scim?  What window manager(s) are you using? (more specificly, QT or GKT interface)

----------

## Biggles

locale:

```
LANG=en_NZ.UTF-8

LC_CTYPE=ja_JP.UTF-8

LC_NUMERIC="en_NZ.UTF-8"

LC_TIME="en_NZ.UTF-8"

LC_COLLATE="en_NZ.UTF-8"

LC_MONETARY="en_NZ.UTF-8"

LC_MESSAGES="en_NZ.UTF-8"

LC_PAPER="en_NZ.UTF-8"

LC_NAME="en_NZ.UTF-8"

LC_ADDRESS="en_NZ.UTF-8"

LC_TELEPHONE="en_NZ.UTF-8"

LC_MEASUREMENT="en_NZ.UTF-8"

LC_IDENTIFICATION="en_NZ.UTF-8"

LC_ALL=
```

uses for scim:

```
app-i18n/scim-1.4.2  +gtk -immqt +immqt-bc 
```

I use XFCE4 as my WM, and I use both GTK and QT apps. Scim does run, I get the switcher icon in the taskbar and can tell it to switch. It just doesn't appear to actually do anything.  :Smile: 

----------

## kloune

Same problem here too, scim was working without problem for 2 month now and now, suddenly, it stopped working, everything looks right and i can't remember changing any configuration. It just doesn't seem to capture any characters anymore.

----------

## AmosMutke

 *Biggles wrote:*   

> 
> 
> uses for scim:
> 
> ```
> ...

 

Interesting, for some reason I have "LC_CTYPE=ja_JP.utf-8" and you have "LC_CTYPE=ja_JP.UTF-8". I have "export LC_CTYPE=ja_JP.UTF-8" in /etc/xprofile, ~/.xprofile, and ~/.profile (for good measure).  But yet the output of locale for me prints the UTF in lower case.  I don't know the reason for this or if it matters. 

The only peice missing should be the XMODIFIERS, GTK_IM_MODULE, and QT_IM_MODULE variables.  I had the same problem.  scim was starting, but I couldn't actually switch to JP input.  It turned out that I had mis-entered the XMODIFIERS variable.  Make sure you enter them EXACTLY as listed in the howto.  It's (afaik) case sensitive.  Once I fixed that, it started working.

 *This howto wrote:*   

> Now, Qt needs an aditional step to use scim - GTK+-only users do not need this;
> 
> emerge skim
> 
> emerge scim-qtimm
> ...

 

 *kloune wrote:*   

> Same problem here too, scim was working without problem for 2 month now and now, suddenly, it stopped working, everything looks right and i can't remember changing any configuration. It just doesn't seem to capture any characters anymore.

 

same advice. Check to see that all your variables are still being set correctly.  ie, check the output of locale and the XMODIFIERS, and GTK_IM_MODULE/QT_IM_MODULE variables using echo.  If all this seems ok, then I'd suggest re-emerging scim, anthy, and scim-anthy.

----------

## kloune

I checked all the variable again and the exports too, they are exactly as written in the turotial. I unmerged and emerged everything already twice and deleted all the scim config files before emerging again, so I think the problem is somewhere else.

There is one thing I forgot to tell that I noticed. In the small scim bar, usually i have the scim icon, then the pin, the current input method and some option for that input method and then the help/about icon. Now, the input method is still there, but the option for the input method are gone. 

For the moment I'm using scim-uim with uim-anthy. If i try to use scim-anthy, everything crashes already at the beginning.

----------

## AmosMutke

did you use the -immqt use flag when compiling scim?  I guess that's unstable.

Also, when you start scim are you using "scim -f socket -c socket -d" ?

the command to start scim changed in a recent update.  I don't know if this is related or not... I'm really just grasping at staws.

EDIT:  also, give the scim-setup a try. maybe a config got messed up someplace. couldn't hurt to try.

----------

## Biggles

My .xprofile (and, now, my .profile and /etc/xprofile) all match the howto's versions and the versions I had in my old install. No change in behaviour.

Running scim-setup didn't help. I don't know what command starts scim as I don't start it myself, it starts automagically.

----------

## AmosMutke

 *Biggles wrote:*   

>  I don't know what command starts scim as I don't start it myself, it starts automagically.

 

really?  you don't load it in your .xinitrc file?  RU sure it's running?  I sounds like you can see the scim window, so it must be running.

```
 >ps -ef | grep scim

shawn     8579     1  0 Nov20 ?        00:00:00 /usr/lib/scim-1.0/scim-launcher -d -c socket -e all -f socket

shawn     8653     1  0 Nov20 ?        00:00:00 /usr/lib/scim-1.0/scim-helper-manager

shawn     8654     1  0 Nov20 ?        00:00:00 /usr/lib/scim-1.0/scim-panel-gtk --display :0.0 -c socket -d --no-stay

shawn     8655  8654  0 Nov20 ?        00:00:00 /usr/lib/scim-1.0/scim-panel-gtk --display :0.0 -c socket -d --no-stay

shawn     8656  8655  0 Nov20 ?        00:00:00 /usr/lib/scim-1.0/scim-panel-gtk --display :0.0 -c socket -d --no-stay

shawn    21038  8669  0 07:36 pts/0    00:00:00 grep scim
```

This is what I have listed.

----------

## kloune

If you use GDM, KDM or XDM, you have to put the variable declarations

```

export XMODIFIERS=@im=SCIM

export GTK_IM_MODULE=scim

export QT_IM_MODULE=scim

```

in the .xprofile file. Somehow, scim is started with that. Don't ask me exactly how it does it. Anyway, the scim things are running and the problem is that the input doesn't get captured. The scim bar is there and has some icons missing which were there before, but else, everything seems ok.

Furthermore, it worked for us before and somehow now it doesn't work anymore, so we can assume that the configuration was right at one point in time. Why would we change it if it works. I think it really has to be something else.

----------

## AmosMutke

Because it's possible something you emerged erased your config files in /etc.  For example, I've had my /etc/fstab reset twice after emerges.  I suppose it's partially my fault for always taking the "auto" -5 option when running etc-update, but the fact still remains that even an emerge sync could have caused changes in your /etc files.

And it's often the simple things that we overlook that is the problem.  After I updated SCIM (about a month ago) it quit working completely.  I had to go thru the whole howto process to try and fix it.  After a couple days of re-emerging and trying several things, it turned out to be a typing mistake in XMODIFIERS=@im=SCIM

As soon as I fixed that, it worked fine.  Before that I could see the scim panel, but I couldn't switch input methods...  It appears you have this set correctly, so it must be something else.  I was just trying to eliminate possibilities.

----------

## Biggles

In my case it wouldn't be a config file being overwritten as I use cfg-update, which is much better about preventing accidental overwrites. However, I'm coming in with a fresh install of gentoo and have followed the HOWTO from scratch. When I compare to my old config files from my previous install, they're all identical.

----------

## kroenecker

FYI

If you are using amd64 (or i686 for that matter), you don't have to install skim.

Just installing using the tutorial through scim-uim makes it easy enough.  Make sure to make the proper environmental changes in the text files.  Do the x server restart env-update etc and finally hit ctrl+space to start up scim-uim.

Done   :Cool: 

----------

## hosikawafuzi

I've been reading through the thread, and I see a lot of info on modifying a system once it's up and running.  Since Gentoo is so flexible in its installation process, is it possible to include everything needed for good Japanese integration from the very beginning?

I'm thinking of switching from Fedora to Gentoo, but I've gotten used to certain tools that come installed on a Fedora system.  For instance, there is a panel in Gnome called the üÍû®XCb`.  Is UIM the same basic thing?

Also, I use a Japanese 106 keyboard.  I didn't read anything on how the UIM behaves with those keyboards.  Such as ¼p/Sp button and the Ï· button.  I prefer to be able to use my input buttons rather than having to stop what I'm typing and clicking on an IME applet.

Any information would be greatly appreciated.  I'd really like to switch to Gentoo, especially on my computer at work.

¯ì ¡

----------

## Biggles

You can set it all up during installation quite easily. When you get to the USE flags setting step of the install, remember to add the necessary USE flags for this stuff (cjk, nls, any others). Then once the main installation process is complete, install scim, etc. After they're installed, add the environment variables. It should work after that.

Scim is essentially the same thing as üÍû®XCb`. It does the same thing; allow you to switch input methods. I don't know how well UIM and Scim handle the extra buttons on a Japanese keyboard though. I would expect that, assuming your keyboard works with X, they will be configurable to use the buttons. I've never used one in Gentoo (you just can't buy them here and they're too bulky to bring back from Japan), so I don't know for sure.

I highly recommend you read this document before installing, too. You need utf-8 for complete Japanese support. Also read this one for a guide on setting other localisation stuff correctly.

----------

## hosikawafuzi

I appreciate the reply.

The way the Gnome applet works has been very useful for me.  I use the Japanese version of WindowsXP and Fedora setup with Japanese localization, so it's very frustrating for me to use a computer that isn't setup that way.  It's nice to just hit the button an go.

Another thing that I wonder about Gentoo is the availability of the man pages in Japanese.  My co-workers can't use English as well as I can, so if they were to use Gentoo, they'd probably need them.

I really want to use Gentoo, but the localization seems to be a big hurdle for me right now.  I'm not good enough with the OS stuff to sit down and figure out what all was done in Fedora to get the Japanese localization.  Having all the applications, menus, man pages, [nearly] everything in Japanese would be best before I could switch off of Fedora.

Anyway, I really appreciate the reply.  I have a computer at home that I can mess with and I'll see what I can come up with.

¯ì

----------

## Biggles

Gentoo definitely has man pages in Japanese. I watched them get installed just a few days ago. One of the use flags must have pulled them down, as I don't actually need them so didn't install them explicitly.

Gentoo is actually considered one of the leading distributions for asian language support. It was pretty much the first to have any form of decent support for asian language input and display that you could setup without having to find all sorts of weird packages on the web and install them manually, alter lots of config files in strange ways, etc. There is a lot of good documentation in the forums about how to do it all. Do a search of the Documentation forum, and also do a search of the forums using google (put site:forums.gentoo.org as your first search term in google). Of course, in many cases whether a program has Japanese menus, etc will depend on that program. Using Gnome or KDE apps will help as they can use the Gnome or KDE localisation stuff.

----------

## sito

Hi people,

I got OpenOffice accepting Japanese input after a lot of attempts and after reading most of the posts other people made.

I've got uim, anthy and scim installed on my box. Scim is for easy text input under most Gnome applications. Scim works on top of anthy. I've set up my .xprofile to use scim whenever I start X.

I use uim exclusively for typing Japanese text under OpenOffice:

I made a script (oowriter_japones) with the following code:

uim-xim &

LC_ALL="ja_JP.utf8" oowriter &

and made it executable with chmod u+x oowriter_japones

when I type ./oowriter_japones, uim starts and stays in the background, the locale is temporarily changed to Japanese UTF-8 (since my system is Unicode-aware) and Writer starts.

It seems that entering the commands above one for one in the console doesn't work. But they work for me within a script.

The only problem is that uim keeps running after Writer is closed. I have to kill uim manually...

Bye

----------

## AmosMutke

sito, how are you able to input japanese in oowriter?  I only get grey space characters when I press <ctrl>+<space>.

I haven't been able to figure out how to change input modes in any of the Open Office programs yet.

I tried your script, but no change.

thanx

----------

## AmosMutke

I found a typo in this howto that I'm sure many other people are having trouble with.

XMODIFIERS should be XMODIFIER.

i.e. no "S"

Once I did this and restarted Xorg, I can now input japanese in Open Office 2 with SCIM.

----------

## _nightw0lf

Hello there.

First of all thanks for this guide! it helped me to set up Hebrew using scim.

now I have a question about scim, 

Why when I add hotkeys for my Hebrew layout and I do apply, then when I press the hotkeys combination, it don't switch to Hebrew?

Thanks in advance.

----------

## AmosMutke

can you be a little more specific?  Does this only not work with the "ctrl+space" combination?  By that I mean, can you manually select your input method using the scim gui.

Are you only having a problem with specific applications?

----------

## _nightw0lf

ok  its solved.

I didn't knew I should use ctrl+space.. now its working. 

thanks   :Embarassed: 

----------

## Jimmy Jazz

 *sito wrote:*   

> Hi people,
> 
> I got OpenOffice accepting Japanese input after a lot of attempts and after reading most of the posts other people made.
> 
> I've got uim, anthy and scim installed on my box. Scim is for easy text input under most Gnome applications. Scim works on top of anthy. I've set up my .xprofile to use scim whenever I start X.
> ...

 

Hello,

you could modify your script to this one:

```

#!/bin/sh

uim-xim &

PID=$!

LC_ALL="ja_JP.utf8" oowriter 

kill $PID

```

Jj

----------

## Hoshimaru

This is gonna sound stupid, but what's the default key to cycle through the kanji's when you typed a word in hiragana? 

Like "í½µ" ? I can't get it to show them... In works well with Gnome on my desktop, but I find it harder to configure with KDE on my laptop ^^'

And where can I change that key ? I managed to get SHIFT+Space to switch to UIM-Anthy and back to European keyboard, but that's it. Please advice me m(_ _)m

----------

## AmosMutke

 *Hoshimaru wrote:*   

> This is gonna sound stupid, but what's the default key to cycle through the kanji's when you typed a word in hiragana? 
> 
> Like "í½µ" ? I can't get it to show them... In works well with Gnome on my desktop, but I find it harder to configure with KDE on my laptop ^^'
> 
> And where can I change that key ? I managed to get SHIFT+Space to switch to UIM-Anthy and back to European keyboard, but that's it. Please advice me m(_ _)m

 

I use the "space" key to toggle thru the kanji...  It works in fluxbox anyway.

----------

## Hoshimaru

 *AmosMutke wrote:*   

>  *Hoshimaru wrote:*   This is gonna sound stupid, but what's the default key to cycle through the kanji's when you typed a word in hiragana? 
> 
> Like "í½µ" ? I can't get it to show them... In works well with Gnome on my desktop, but I find it harder to configure with KDE on my laptop ^^'
> 
> And where can I change that key ? I managed to get SHIFT+Space to switch to UIM-Anthy and back to European keyboard, but that's it. Please advice me m(_ _)m 
> ...

 

That key doesn't work for some reason... not in kwrite, not in kopete, not in OpenOffice and so on :'(

----------

## robbyjo

I followed the guide here and it works great. Thanks.

However, my problem is that... Although I turned off all shortcuts, SKIM tends to turn on by itself. When I do programming, I often use Shift+Ctrl+Left arrow or Shift+Ctrl+Right Arrow key combinations to do highlighting. It always turns on SKIM and suddenly I see Japanese texts in my program. This is very annoying and I can't seem to turn it off. Any ideas?

----------

## Pajarico

Hi, i just installed the fonts for korean, chinese and japanese listed on the first part of the HOWTO. Then did a  fc-cache -fv and firefox started to use the fonts inmediately. The only glitch is that the titlebar is still showing the typical square with numbers inside:

screenshot | the page I was watching

Also, if i execute  fc-cache -fv, do i have to add the directories containing the asian fonts to xorg.conf? Is it the same?

----------

## Biggles

Update time for my little problem! After lots of time of... not really doing anything to it, followed by an update yesterday that pulled in a new version of skim (now at skim-1.4.2) and anthy (now at anthy-7100b-r1), it's suddenly started semi-working with both canna and anthy. They sometimes allow input of Japanese characters (including kana to kanji conversion), and at other times don't. Canna appears to be more reliable than anthy, but it still seems pretty random. It was working in Firefox when I started writing this and now isn't, but at the same time is still working in xchat. Still no clue what was/is wrong, but maybe it's gradually fixing itself.

----------

## ovokinder

Although I've religiously followed the HOWTO, japanese input was a no-go for me.

Skim did launch, I could configure it, I could see lotsa IMEs, but no input.

Left clicking on the icon showed an empty menu, instead of the input methods it was supposed to.

I've managed to make it work with some ugly workarounds:

1. In /etc/xprofile (or my own .xprofile)

```

export LC_CTYPE="ja_JP.UTF-8"

```

Strangely enough, that made it work on most apps. On some other, text would go nuts (eg. matlab).

No big deal, since I don't need japanese on matlab and could easily be fixed with 

```
LC_CTYPE="pt_PT.UTF-8" matlab
```

...

2. In /etc/xprofile (or my own...)

```

export XMODIFIERS=@im=SCIM

export XMODIFIER=@im=SCIM

export GTK_IM_MODULE=XIM

export QT_IM_MODULE=XIM

```

Notice the IM for qt/gtk apps is xim and not scim.

Simply put, one of these two would make things work (I'm using the second since I can keep my locales to what I want 'em).

The problem comes when closing skim. Every app that uses input crashes.

Why would I want to close skim? I wouldn't. It happens when I log out of KDE, and the session manager shuts down all apps. The session manager itself ends up crashing too and instead of rebooting/shutting down/etc I'm just thrown to the console (same as ctrl+alt+f1).

Once again, I've worked it around by killing skim manually, but that crashes all apps over again (but I can shutdown/reboot). Kind of annoying...  :Confused: 

Other thing that doesn't work for me is enabling/disabling scim/skim.

It doesn't seem to respect my locales or keyboard definitions.

Being portuguese, I *NEED* (and I can't stress that enough) latin chars with accents (eg. Ã¡Ã©Ã­ÃºÃ³).

So I've got ctrl+space > English/European(got it working with my locale, pt_PT.UTF-8 ) and ctrl+shift+space > Anthy. In other words, I never disable it, just keep switching between two input types (I know by disabling it I'd also be switching between im's, but you got the picture...). 

Not what I'd like, but hey... it works...  :Rolling Eyes: 

I don't really mind having to use these unorthodox methods to get japanese input to work. What really pisses me off is the app crashing thing.

I'm using KDE 3.5.0, uim-1.0.0, skim 1.4.3, scim 1.4.3, scim-uim 0.1.3, anthy 7100b-r1.

If you need any other info...

ã©ãããããã¨ã

----------

## Sudrien

Now, about that wiki request...

http://gentoo-wiki.com/HOWTO_Enabling_Japanese is a significant rewrite of the current HOWTO. The rewrite is in it's first draft, so I would ask people to comment on it here or PM me on issues more important on it that spelling corrections and wikifying it, until the warning is removed.

I'd love some feedback.

-Sud.

----------

## Biggles

New update! Changing XMODIFIERS to XMODIFIER appears to have fixed any remaining problems. It all works lovely now. Weird.

----------

## Pajarico

My problem is gone, now I have asian characters in the title bar and I can copy/paste those special characters to/from the clipboard. I'm not sure what I did, I think upgrading firefox to 1.5 did it.

----------

## _nightw0lf

Hey guys, I've managed to make it work with firefox, and it did worked with Licq, but now i've upgraded Licq to the last version 1.32, and I set it to use 

qt-gui plugin, (couldn't install the kde one)

anyways, when I press CTRL+Space, nothing happen, and I cannot change to the language I want, same goes with Opera, and Konqueror.

It works on FireFox tho.

Thanks in advance.

----------

## shuusaku

Hello. I've just installed the Japanese support on my laptop (gentoo 2.6.14.r5) and everything works almost fine. There is however the problem that some programs do not accept Japanese input, they accept only normal text. In particular, Kopete (the KDE instant messanger), all the text editors found with KDE, and the Konsole (these at least are the ones I tried). 

Is there anything I am missing? Thanks for your help

----------

## tuber

I am able to enter Chinese text inside Kopete 3.4.3. To do so, first choose the input method using the SKIM icon in the KDE tray. Once in Kopete, right click in the entry window (the bottom one) and choose Select Input Method->XIM. That should do it.

----------

## Kateikyoushi

I use ratpoision therefore I do not have a taskbar, should this work for me without that ?

----------

## Sudrien

 *Kateikyoushi wrote:*   

> I use ratpoision therefore I do not have a taskbar, should this work for me without that ?

 

Without a Notification area, you will probably feel comfortable using straight UIM-anthy. Refer to the new Wiki link.

-Sud.

----------

## ranmakun

Hey, thanks for the great HOWTO!!, unfortunately I have a problem, since I changed my locale from "es_AR" to "es_AR.UTF-8" some things started to appear with wrong characters, for example this output from mplayer: (Not sure if the wrong characters will show up)

 *Quote:*   

> 
> 
> MPlayer ha sido interrumpido por se�l 11 en el m�ulo: decode_video
> 
> - MPlayer se detuvo por mal uso de CPU/FPU/RAM.
> ...

 

Is there any way to solve this problem?, Im able to write any kind of characters in the console without problems, just these are wrong. Ive also found some wrong characters in kmail (they show as a square or two squares per character), some old mails, but not all my mails.

Thank you.

----------

## Sudrien

 *ranmakun wrote:*   

> since I changed my locale from "es_AR" to "es_AR.UTF-8" some things started to appear with wrong characters...

 

edit /etc/rc.conf and change the

UNICODE="no"

to 

UNICODE="yes"

See if this helps the mplayer output.

-Sud.

----------

## ranmakun

 *Sudrien wrote:*   

>  *ranmakun wrote:*   since I changed my locale from "es_AR" to "es_AR.UTF-8" some things started to appear with wrong characters... 
> 
> edit /etc/rc.conf and change the
> 
> UNICODE="no"
> ...

 

Tried that, in fact, that was my original setting. There are a lot of problems with my characters, accented characters in mails appear wrong, in konsole, etc. But, for example, if I login remotely also using console I can see the mplayer error with the correct character. Any ideas?

----------

## Sudrien

 *ranmakun wrote:*   

> Tried that, in fact, that was my original setting. There are a lot of problems with my characters, accented characters in mails appear wrong, in konsole, etc. But, for example, if I login remotely also using console I can see the mplayer error with the correct character. Any ideas?

 

Since this seems to be a UTF8 issue, I'd suggest looking through other threads on the issue, like http://www.gentoo.org/doc/en/utf-8.xml and https://forums.gentoo.org/viewtopic-t-166984.html. I could offer a few things to check before asking questions there:

What font is your terminal using?

What is your mail client (and is it terminal based)? 

I really can't say much about how mapping fonts to characters changes when using utf8 - you just may have success when not using the utf8 locale. 

-Sud.

----------

## Gentist

I have a few questions: How do I switch input without deleting what I've previously written? Writing something in, say, hiragana and then switching back to the English input makes all the hiragana disappear. Also, I can't seem to copy (mark it and ctrl+c) or otherwise alter Japanese text written through scim. For example, how do I make a plain space? Pressing spacebar brings up alternative ways of spelling it instead.

----------

## Sudrien

 *Gentist wrote:*   

> I have a few questions: How do I switch input without deleting what I've previously written? Writing something in, say, hiragana and then switching back to the English input makes all the hiragana disappear. Also, I can't seem to copy (mark it and ctrl+c) or otherwise alter Japanese text written through scim. For example, how do I make a plain space? Pressing spacebar brings up alternative ways of spelling it instead.

 

To end a phrase in hiragana, just hit the 'Enter' key, accepting the hiragana version. You need to hit 'Enter' twice to get a line break.

Copy and paste aren't allowed while there is an indeterminate/unaccepted phrase. Make sure you hit 'Enter' before selecting.

Since hiragana/kanji are essentially a fixed width font, only the wider spaces are available in hiragana mode. Switch back to Raw input/English to get 'normal' spacing.

-Sud.

----------

## Gentist

 *Sudrien wrote:*   

> To end a phrase in hiragana, just hit the 'Enter' key, accepting the hiragana version. You need to hit 'Enter' twice to get a line break.

 

Ah, so that's how it works. Thanks.

I suppose there's no way to make this work in apps that aren't GTK+/Qt based, such as terminals, or do I have to copy/paste things from GTK+/Qt based apps?

----------

## Biggles

You can use a terminal that supports it. Konsole and gnome-terminal both do. I use gnome-terminal myself. It happily displays and inputs in Japanese eveything.

----------

## ranmakun

 *Sudrien wrote:*   

>  *ranmakun wrote:*   Tried that, in fact, that was my original setting. There are a lot of problems with my characters, accented characters in mails appear wrong, in konsole, etc. But, for example, if I login remotely also using console I can see the mplayer error with the correct character. Any ideas? 
> 
> Since this seems to be a UTF8 issue, I'd suggest looking through other threads on the issue, like http://www.gentoo.org/doc/en/utf-8.xml and https://forums.gentoo.org/viewtopic-t-166984.html. I could offer a few things to check before asking questions there:
> 
> What font is your terminal using?
> ...

 

Ok, I've read that document but the problem continues (although it was usefull for other things, thank you.)

I'm using KDE, konsole and kmail as my terminal and mail programs.

In kmail the problem is that I see the old mails without problems, but the new ones have squares in the place of special characters. I guess the problem is that I'm not using an unicode font, but then my question would be, how can I know if the font I'm using is unicode or not?

The other question is, when I switch to the unicode font, will I see wrong all the old mails that were coded in extended ASCII?

On the other hand I find hard to believe that the font I'm using is not unicode, since I can write japanese without problems, and I can see every web page in japanese, spanish, english and portuguese without encoding problems.

----------

## vf1sveritech

ok, i have followed the first post on this forum and the wiki, and the problem i have is that there doesnt seem to be any input modes in skim.  Skim shows up just fine in the system tray, or in some dockable window that i cna move around, but when i click it it shows this tiny little empty box which i assume is where the different input modes go.  however, its empty...in the configure window it looks like everythings fine i have all the japanese things selected.  I have restarted and tried different things and havent figured it out.

OK OK i got it working in Gaim, upon right clicking the text box it shows a scim input thing and i selected that and then the thing showed other input methods. However, firefox and kwrite dont seem to have that in the right click menu...

----------

## Biggles

Woo! One hard drive crash and reinstall later, and this time it went first try.  :Smile: 

vf1sveritech: What input methods do you have installed? If you have anthy installed, it *should* be available under the Japanese submenu (although from the sounds of it you don't get any menu at all). If it's canna, make sure you start the canna service. If you're not actually getting a menu at all... well I ran into that a few times with my last install and I think it was because I was playing around with the LANG and LC_CTYPE variables. Make sure they're set correctly in your .xprofile file.

----------

## vf1sveritech

woh a quick reply.  Ok i've got it working in gaim and konqueror cause when you right click a text box area, like an instant message window or when i went to rename a file, it says "input methods" and it lists a whole bunch, and one of them is scims input method, and so i can use those.  However Firefox doesn't have such an option. 

I have both canna and anthy installed, anthy is the default one for scim i think...

The howto didnt say to put Lang or LC in xprofile, but after reading some more of this post it said

```

export LANG=de_DE.UTF-8

export LC_CTYPE=ja_JP.UTF-8

```

so do i Just change de_DE.UTF-8 to my own? and leave LC_TYPE set to japanese?

----------

## Biggles

Set LANG to your local one (in my case, it's en_NZ.UTF- :Cool: . Set LC_CTYPE to the language you want to be able to use as secondary, which is Japanese for me but may also be Korean or Chinese. If you want multiple from those three... well I don't really know what to do in that case.

----------

## Gentist

 *Biggles wrote:*   

> You can use a terminal that supports it. Konsole and gnome-terminal both do. I use gnome-terminal myself. It happily displays and inputs in Japanese eveything.

 

That would work. However, I want a lightweight terminal that doesn't depend on all that GNOME/KDE stuff. The reason is that I run neither as desktop environment. My terminal supports Unicode, and provided that I switch font to one that supports Japanese, displaying it shouldn't be a problem. However, since the terminal isn't based on GTK+ or Qt, the regular SCIM method won't work. What I was wondering was whether there's another way or another plugin which would take care of Japanese input for non-GTK+/Qt apps. If not, I suppose I'll have to copy/paste from an editor.

----------

## Biggles

I don't know of any input method selectors that don't use GTK or QT. I think the only way to do it otherwise is tell your system that you have a different keyboard layout, which would probably affect every program and wouldn't really help as you'd have to type blind.

----------

## Kateikyoushi

 *Sudrien wrote:*   

>  *Kateikyoushi wrote:*   I use ratpoision therefore I do not have a taskbar, should this work for me without that ? 
> 
> Without a Notification area, you will probably feel comfortable using straight UIM-anthy. Refer to the new Wiki link.
> 
> -Sud.

 

Thanks indeed it works well, I am surprised zenkaku hankaku key is mapped. Quite good.

----------

## Remillard

I've been trying to get this to work for several days and last night finally had some success with it.  However it seems to be strange success based on the comments I've read.

I've followed the wiki instructions and have installed everything, have emerged with new use flags for back compatibility, etc.  I've modified the .xprofile (and the one in /etc too).  I've got scim and skim. 

So, I right click on the text area in KMail, and voila, I can select input methods which is great.  I sent some e-mail last night using that, that I hadn't been able to before.

However NO other application as far as I can tell allows that method (right-click).  Konsole doesn't.  KWrite doesn't.  Kate doesn't.  KWord (I was VERY disappointed here) doesn't.  

For the non-KDE applications, the ctrl-space method doesn't work.  It just puts in a space (or in KWord it seems to put in a hard space, or at least a highlighted space.)  OpenOffice doesn't seem to permit it.  No Java applications support it.

So, what am I missing for the ctrl-space method not to work?  I've got the skim icon in the taskbar and I've verified that the basic functionality DOES work in KMail.  But I'm at a loss at what's missing for everything else.

Anyone have any ideas on this?

Best regards,

Remillard

----------

## Magnum44

Hi, I've been reading this whole topic and... I don't know if I almost forgot how to read or what! because I can't get the japanese UIM working without crashing my programs.

Now I have the UIM working ok, I can open a kwrite and test it, or just a gnome app, but with KDE lots of programs doesn't work.

I'm going to write all the stuff so anybody helps me! arf   :Embarassed: 

First, the errors that some programs give me:

```
$ thunderbird

No running windows found

/usr/libexec/mozilla-launcher: line 116: 31101 Violación de segmento   "$mozbin" "$@"

thunderbird-bin exited with non-zero status (139)

$ firefox

No running windows found

/usr/libexec/mozilla-launcher: line 116: 31986 Violación de segmento   "$mozbin" "$@"

firefox-bin exited with non-zero status (139)

$ kopete

ScimInputContextPlugin()

$ konqueror

ScimInputContextPlugin()

*** glibc detected *** free(): invalid pointer: 0x0813bec0 ***

Temporizador

$ smb4k

ScimInputContextPlugin()

*** glibc detected *** free(): invalid next size (fast): 0x082c0410 ***

smb4k: ERROR: Communication problem with smb4k, it probably crashed.

```

Now the error that (I think "vi") is throwing me when I try to etc-update through console:

```

# etc-update

.

.

.

.

Please select a file to edit by entering the corresponding number.

              (don't use -3 or -5 if you're unsure what to do)

              (-1 to exit) (-3 to auto merge all remaining files)

                           (-5 to auto-merge AND not use 'mv -i'): 1

invalid charset name

1) Replace original with update

2) Delete update, keeping original as is

3) Interactively merge original with update

4) Show differences again

```

Now, my config:

```
$ cat /etc/xprofile

export LANG=es_ES.UTF-8

export LC_CTYPE=ja_JP.UTF-8 # this modification is needed if you want to use openoffice with scim!!!!!!!!

export XMODIFIERS=@im=SCIM

export XMODIFIER=@im=SCIM

export GTK_IM_MODULE=scim

export QT_IM_MODULE=scim
```

```
$ cat /etc/rc.conf |grep UNICODE

# UNICODE specifies whether you want to have UNICODE support in the console.

# If you set to yes, please make sure to set a UNICODE aware CONSOLEFONT and

UNICODE="yes"
```

```
$ locale

LANG=es_ES@euro

LC_CTYPE="es_ES@euro"

LC_NUMERIC="es_ES@euro"

LC_TIME="es_ES@euro"

LC_COLLATE="es_ES@euro"

LC_MONETARY="es_ES@euro"

LC_MESSAGES="es_ES@euro"

LC_PAPER="es_ES@euro"

LC_NAME="es_ES@euro"

LC_ADDRESS="es_ES@euro"

LC_TELEPHONE="es_ES@euro"

LC_MEASUREMENT="es_ES@euro"

LC_IDENTIFICATION="es_ES@euro"

LC_ALL=es_ES@euro
```

```
$ locale -a | grep utf8

en_US.utf8

es_ES.utf8

es_ES.utf8@euro

ja_JP.utf8
```

And to finish my versions of the programs:

```
*  app-i18n/scim-uim

      Latest version available: 0.1.3

      Latest version installed: 0.1.3

*  app-i18n/scim-qtimm

      Latest version available: 0.9.3

      Latest version installed: 0.9.3

*  app-i18n/scim

      Latest version available: 1.4.2

      Latest version installed: 1.4.2

*  app-i18n/anthy

      Latest version available: 6700b

      Latest version installed: 6700b

*  app-i18n/skim

      Latest version available: 1.4.2

      Latest version installed: 1.4.2
```

I'm sick of punching this thing... I don't know what the hell crash my KDE programs when KDE is working correctly... Any ideas?

Thaaaaaaaaaaaaaaanks!

----------

## Biggles

You're launching all those programs from a terminal, but the locale variables, etc haven't been exported there. Otherwise locale should show the values that you're exporting (es_ES.UTF-8 and ja_JP.UTF-8). For example, when I run locale I get:

```
~ $ locale

LANG=en_NZ.UTF-8

LC_CTYPE=ja_JP.UTF-8

LC_NUMERIC="en_NZ.UTF-8"

LC_TIME="en_NZ.UTF-8"

LC_COLLATE="en_NZ.UTF-8"

LC_MONETARY="en_NZ.UTF-8"

LC_MESSAGES="en_NZ.UTF-8"

LC_PAPER="en_NZ.UTF-8"

LC_NAME="en_NZ.UTF-8"

LC_ADDRESS="en_NZ.UTF-8"

LC_TELEPHONE="en_NZ.UTF-8"

LC_MEASUREMENT="en_NZ.UTF-8"

LC_IDENTIFICATION="en_NZ.UTF-8"

LC_ALL=
```

And in both my ~/.xprofile and ~/.bashrc I have:

```
export XMODIFIER=@im=SCIM

export GTK_IM_MODULE=scim

export QT_IM_MODULE=scim

export LANG=en_NZ.UTF-8

export LC_CTYPE=ja_JP.UTF-8
```

Try adding the exports you have in your xprofile file to your ~/.bashrc file. I'm not sure why your programs are crashing (is that a segmentation fault?), but try this anyway.

----------

## KK_r

All my locales are set to sv_SE.UTF-8 but by starting the xim-deamon with LC_CTYPE=ja_JP.UTF-8 everything except ooffice works (ooffice works if started with LC_CTYPE=ja_JP.UTF-8 ). So you don't have to change LC_CTYPE for the rest of your programs. This is from my .xinitrc:

```
LC_CTYPE=ja_JP.UTF-8 exec uim-xim &
```

and this is /etc/env.d/99xim:

```
XIM="uim"

XMODIFIER="@im=uim"

QT_IM_MODULE="uim"

GTK_IM_MODULE="uim"
```

(change uim to scim if that is what you use)

----------

## Magnum44

Well well well... I think that I've repaired something:

```
$ locale

LANG=es_ES.UTF-8

LC_CTYPE="es_ES.UTF-8"

LC_NUMERIC="es_ES.UTF-8"

LC_TIME="es_ES.UTF-8"

LC_COLLATE="es_ES.UTF-8"

LC_MONETARY="es_ES.UTF-8"

LC_MESSAGES="es_ES.UTF-8"

LC_PAPER="es_ES.UTF-8"

LC_NAME="es_ES.UTF-8"

LC_ADDRESS="es_ES.UTF-8"

LC_TELEPHONE="es_ES.UTF-8"

LC_MEASUREMENT="es_ES.UTF-8"

LC_IDENTIFICATION="es_ES.UTF-8"

LC_ALL=es_ES.UTF-8

```

And after reemerge firefox and thunderbird, this two works. Now I'm reemerging a lot of packages with new uses expectating that this repairs all my kde apps that still not works.

For example, konqueror fails when I try to open it from konsole running just konqueror:

```
$ konqueror

ScimInputContextPlugin()

KCrash: Application 'konqueror' crashing...

ScimInputContextPlugin()

*** glibc detected *** free(): invalid next size (fast): 0x082b9420 ***

```

But when I use the icon on desktop it works (this icon execute: kfmclient openProfile webbrowsing)

Annnd... I've observed that in OpenOffice 2.0 some dialogs seems to crash or something because there are menues and buttons with no text (for example the buttons on "save as" dialog or in export to pdf)

Is this a problem of scim and company or is this a separate problem that has not union to UIMs ? It's the first time that I run this new version.

Thanks all.   :Wink: 

----------

## Magnum44

Hi all!

KDE problems solved! But there is one more problem that is driving me crazy:

```
# less

invalid charset name

```

Any ideas?   :Crying or Very sad: 

----------

## Sudrien

After (quite) a bit of reformatting, The new revision of the HOWTO has been copied over from the wiki.

-Sud.

----------

## frostschutz

About the XMODIFIERS vs. XMODIFIER issue, taken from the X.Org sourcecode:

lib/X11/lcWrap.c

```
char *

XSetLocaleModifiers(

    const char *modifiers)

{

    XLCd lcd = _XlcCurrentLC();

    char *user_mods;

    if (!lcd)

        return (char *) NULL;

    if (!modifiers)

        return lcd->core->modifiers;

    user_mods = getenv("XMODIFIERS");

    modifiers = (*lcd->methods->map_modifiers) (lcd,

                                                user_mods, (char *)modifiers);

    if (modifiers) {

        if (lcd->core->modifiers)

            Xfree(lcd->core->modifiers);

        lcd->core->modifiers = (char *)modifiers;

    }

    return (char *)modifiers;

}
```

So XMODIFIERS can't be wrong. Also, the X man page (man X) lists XMODIFIERS only.

Although I've read in some threads of the forums that it's supposed to be XMODIFIER instead of XMODIFIERS, I can't see how that can be true. There is no reference to XMODIFIER at all in the X source code. Of course, that doesn't mean that nobody's using it, but if someone does, I'd consider that a bug.

EDIT: To the people who solved problems by changing XMODIFIERS to XMODIFIER, could you verify that the problem is back when you change it to XMODIFIERS again, and that the problem persists when you just comment XMODIFIERS out? And if this is the case, which application are you having problems with?

----------

## frostschutz

I can't get scim to work in Openoffice, most likely due to this error:

```
# scim -d

Smart Common Input Method 1.4.2

Launching a SCIM daemon with Socket FrontEnd...

Loading simple Config module ...

Creating backend ...

Loading socket FrontEnd module ...

Starting SCIM as daemon ...

Launching a SCIM process with x11...

Loading socket Config module ...

Creating backend ...

Loading x11 FrontEnd module ...

Failed to load x11 FrontEnd module.

Failed to launch SCIM.
```

scim -l however lists the x11 frontend module as present. Any ideas?

According to what I've found on the web, the x11 frontend module is required for all applications that have to rely on XIM input method.

----------

## Biggles

I didn't think the XMODIFIERS vs XMODIFIER thing made sense either, since mine used to work fine with XMODIFIERS, and the source code pretty much prooves it. I'll try changing it back to that again when I turn on my laptop in a couple of hours. Maybe it was just the presence of XMODIFIERS?

----------

## Wonderbike

I've followed every step of this post a few times and I still don't have Japanese input in Gnome. The input mode box that says "_A" is on my toolbar. I can click on it, and see the other options for hiragana and such, but when I click on them, the box stays just "_A". The shortcut keys to change input modes also have no effect. If I right-click the "_A" and go into properties, everything seems in order, but in Firefox, OpenOffice, Gaim, and Text Editor, and everything else I've tried, the "_A" never changes to "_ " (copy-pasted that one). Did I skip something?

thanks in advance.

----------

## Biggles

I tried removing XMODIFIER(S) from my config files, and it didn't appear to make any difference at all. This suggests that the variable is irrelevant.

----------

## frostschutz

 *frostschutz wrote:*   

> I can't get scim to work in Openoffice, most likely due to this error:
> 
> ```
> [...]
> 
> ...

 

I solved it by upgrading all scim to ~x86 (that is scim 1.4.4 & co, not just scim 1.4.4): 

```
~#> cd /usr/portage

/usr/portage#> for f in app-i18n/scim*; do echo "$f" >> /etc/portage/package.keywords; done;

/usr/portage#> emerge --pretend --deep --update world
```

----------

## wisnij

So is there any way to install things that depend on canna while I've got tetex installed?  'Cause if not, I guess I'm just out of luck.    :Sad: 

----------

## Biggles

What do you mean? I have both canna and tetex installed.

----------

## wisnij

Ah, my mistake.  I've got +doc set in make.conf and the documentation for canna depends on ptex, which conflicts with tetex.  I thought it was canna itself.

----------

## frostschutz

 *wisnij wrote:*   

> Ah, my mistake.  I've got +doc set in make.conf and the documentation for canna depends on ptex, which conflicts with tetex.  I thought it was canna itself.

 

Thanks for pointing that out, I was wondering about it too. I guess I'll disable doc just for canna in /etc/portage/package.use

It'd be interesting to know wether it really requires ptex, or wether it should just require virtual/tex or something. I.e. does it require any feature of ptex that is not provided by tetex (if it does, most likely, this will be CJK support, but who knows...)

----------

## rocketrabbit

 *Quote:*   

> Setting Locale 

 

which file do i set locale in?

----------

## KK_r

/etc/env.d/02locale

----------

## FlumMmicH

ありがとうございます！

it works very well  :Very Happy:  tyvm!

----------

## Xamindar

If you make a folder or filename in japanese on any drive (usb or fat or ntfs) and try to view it in windows is it in any way messed up?  I'm having that problem right now and could use some help fixing it.  https://forums.gentoo.org/viewtopic-p-3354060.html#3354060

Same thing happens if I make a file with japanese characters in windows and then attempt to see it in Linux, I just get a bunch of "??????"

----------

## Magnum44

Hello again, I'm inspired again so I'm trying to solve another problem that came with UTF-8 and Japanese input, the symbols of "greather than" and "lower than" (the key next to left shift in my spanish layout keyboard) don't work... Does anybody nows how to fix this?

And another problem is that in OpenOffice I can't use accents... Any ideas?

Thanks all folks!   :Rolling Eyes: 

----------

## Sudrien

 *Magnum44 wrote:*   

> Hello again, I'm inspired again so I'm trying to solve another problem that came with UTF-8 and Japanese input, the symbols of "greather than" and "lower than" (the key next to left shift in my spanish layout keyboard) don't work... Does anybody nows how to fix this?
> 
> And another problem is that in OpenOffice I can't use accents... Any ideas?
> 
> Thanks all folks!  

 

I would think this is an Xorg-x11 keyboard issue - the layout can be configured seperately http://www.gentoo.org/doc/en/xorg-config.xml#doc_chap4_sect2 - I would assume it was working correctly before?

-Sud.

----------

## Magnum44

Mmm... I'm reading that link and looking my xorg.conf, I think I have that ok:

```
* x11-base/xorg-x11

     Available versions:  6.8.2-r7 [M]6.9.0-r1 ~7.0-r1 ~7.1

     Installed:           6.8.2-r7

```

My keyboard section in xorg.conf:

```
Section "InputDevice"

    Identifier  "Keyboard1"

    Driver      "kbd"

    Option "AutoRepeat" "500 30"

    Option "XkbModel"   "pc104"

    Option "XkbLayout"  "es"

EndSection

```

 *Quote:*   

> I would assume it was working correctly before? 

 

Yes, before upgrade to UTF-8 and Japanese input, when I was using the default 8859-1 or 8859-15 (Occidental Europe) all the keyboard worked well.

More ideas?

----------

## Sudrien

 *Magnum44 wrote:*   

>  *Quote:*   I would assume it was working correctly before?  
> 
> Yes, before upgrade to UTF-8 and Japanese input, when I was using the default 8859-1 or 8859-15 (Occidental Europe) all the keyboard worked well.
> 
> More ideas?

 

https://bugs.freedesktop.org/show_bug.cgi?id=3988 seems to have a similar problem mentioned. I think the issue may be that you want more than anthy's 'raw keyboard input' can handle (probably understandably).

Try looking for a specifice UIM module that supports ES input, or upgrading to uim-1.1.0 (is it in portage yet?)

-Sud.

----------

## Magnum44

Nope, that bug is not the point... I can use accents in KDE (not in Openoffice, another thing to do). In KDE the only thing that don't work is greather and lower keys...

 :Crying or Very sad: 

----------

## pèdratan

 *Sudrien wrote:*   

> 
> 
> https://bugs.freedesktop.org/show_bug.cgi?id=3988 seems to have a similar problem mentioned. I think the issue may be that you want more than anthy's 'raw keyboard input' can handle (probably understandably).
> 
> Try looking for a specifice UIM module that supports ES input, or upgrading to uim-1.1.0 (is it in portage yet?)
> ...

 

I filed that bug, but I have not verified if the fix works because I changed from uim to scim + scim-anthy + scim-qtimm. Anyway, that only happened when you used QT_IM_MODULE=uim, as stated before in this howto. It was solved if you used scim instead, so it should work now.

Funny thing is everything (accents included) worked until a week ago. Now I have the same problem in qt, but without uim at all. I have just posted in a bug filed by other person about this deadkeys issue:

https://bugs.gentoo.org/show_bug.cgi?id=131644

If anyone is interested  :Wink: 

----------

## olof

If anyone is interested, I posted some ebuilds for Tomoe in bugzilla (tomoe, libtomoe-gtk, scim-tomoe). Tomoe is a japanese handwriting recognition engine, and with scim-tomoe it integrates nicely into scim, giving you something close to the full IME in windows. It may not be quite as good as the Microsoft handwriting recognition yet, but at least it is usable. For a nice description take a look here. 

If you have any comments on the ebuilds pleast let me know, it's my first time submitting ebuilds.

----------

## frostschutz

Thanks, I'll definitely test this tomoe out sometime. Until now I was using kanjipad, which kind of works, but it's extremely uncomfortable. First you have to draw the kanji, then hit a 'search' button, then select the correct one from the list, then click copy, then paste it into your target application... for single kanji this is okay but it's tedious when you have to look up more.

On the Sharp Zaurus (Japanese portable Linux device) you have much better handwriting recognition, 3 input fields, so you can just draw one kanji, continue in the next field, and so on, and the recognized characters will automatically be inserted into the text. If this tomoe thing can work in a similar fashion, I'll be happy.  :Smile: 

===

Now onto some problems I have: After doing a fresh Gentoo install, Japanese input stopped working with xterm/urxvt and OpenOffice. When pressing ctrl+space, the input window comes up, however inserting the Japanese text into the application does not work. For example, when typing something like ひらがな, the result that gets pasted into the application is "*c2ccc", along with some special characters. However, it's not that the applications can't handle Japanese - copy&pasting Japanese text works and gets displayed properly. So my guess is that SCIM sends crap or uses wrong charset (whole system runs in UTF-8 mode as per this Howto though).

Anyone else seeing this behaviour?

----------

## Freak_NL

 *olof wrote:*   

> If anyone is interested, I posted some ebuilds for Tomoe in bugzilla (tomoe, libtomoe-gtk, scim-tomoe). Tomoe is a japanese handwriting recognition engine, and with scim-tomoe it integrates nicely into scim, giving you something close to the full IME in windows. It may not be quite as good as the Microsoft handwriting recognition yet, but at least it is usable. For a nice description take a look here. 
> 
> If you have any comments on the ebuilds pleast let me know, it's my first time submitting ebuilds.

 

I'm very much impressed with Tomoe (thanks for the ebuilds olof), but I wonder where they've gotten their character data from. They seem to know about the CHISE project, so I can imagine that they've used its IDS database as a source.

What bothers me though, on my Sharp Zaurus the kanji 字 (ji) can be written with both 5 and 6 strokes. Both are common ways of writing the character, although I'm not sure which one is "correct" (the Nelson dictionary considers it as having 6 strokes, as does CHISE). Yet Tomoe won't accept the 6 stroke way of writing..

----------

## yaneurabeya

Has anyone successfully changed the input method change keys for (straight) UIM, and if so how? I hate the shift-space default and the other methods I input into the pref app seem to fail when dealing in the uim daemon.

TIA.

----------

## Sudrien

 *yaneurabeya wrote:*   

> Has anyone successfully changed the input method change keys for (straight) UIM, and if so how?

 

uim-pref-gtk - under "Global Key Bindings 1" - you can add and remove the settings as you need.

-Sud.

----------

## blauer_bildschirm

Hello, 

I got skim working following the guide on page 1, but still have some problem: 

I am using a german keyboard layout and want to type hangul (3bul, using scim-hangul). When I toggle scim on and switch to 3bul, I get umlauts instead of the korean characters in some cases and the characters that are assigned to y/z are switched. 

Of course I could switch my keyboard layout to US English, but then I couldn't use a german layout in case scim weren't running. I've already tried changing the Keyboard Layout in the skim settings from unknown to both German and US English. Neither does work. 

Does anybody know if there is way to fix this?

----------

## Hoshimaru

Hmmm ...

I guess I'm not the only one doing this: using Kopete with Gnome instead of aMsn or Gaim.

Does somewone know how I can use SCIM with Kopete, like it works with OpenOffice, Gedit, xchat etc?

I remember from my friends PC that he could choose the input method "XIM" by rightclicking and then use scim to type. I do not have this possibility with Gnome & Kopete. 

Any ideas ?

----------

## pèdratan

Completely offtopic, but I think probably this is the best thread to ask in:

What is the difference between anthy and anthy-ss?

Only the gentoo portage has the later, and in the anthy web site there is no info about it... or maybe there is, but in japanese.

Anyone has a clue?

Thanks.

----------

## yaneurabeya

 *Sudrien wrote:*   

>  *yaneurabeya wrote:*   Has anyone successfully changed the input method change keys for (straight) UIM, and if so how? 
> 
> uim-pref-gtk - under "Global Key Bindings 1" - you can add and remove the settings as you need.
> 
> -Sud.

 

Sorry, but I meant straight editing ~/.uim or something similar because that particular method doesn't appear to work properly yet.. or at least it screws up and doesn't activate/deactivate the UIM IM after I change that setting.

Can someone that properly modified their ~/.uim file post it here please? Thanks!

----------

## Inhuman_

今、日本語が使えできる！　どうもありがとう！

でもちゅとむすかしいでした。

----------

## boltar

I've followed the guide, I can enter hiragana and katakana, but I'm having problems with the dictionary.  I fire off scim, then I start uim-toolbar-gtk, and I select "anthy" as my input method.  For example, when I type 'nihon' にほん in hiragana, then press spacebar, I was expecting to see the kanji for nihon, but I'm seeing some weird listings:  Here are the top 3 choices:

口碑ん

后妃ん

高庇ん

None of which makes any sense.  Sometimes the kanji lookup will crash the app (gaim or gedit).

These are the packages I have emerged:

app-i18n/scim 1.4.4

app-i18n/scim-anthy 0.7.1

app-i18n/scim-tables 0.5.3

app-i18n/scim-uim 0.1.3

app-i18n/anthy 7500b

app-i18n/uim 0.5.0.1

----------

## yaneurabeya

Just like to note that if you upgrade your version of gtk to the latest version of 2.10 and you use uim exclusively, you may also need to upgrade your version of anthy and uim, and then be sure to enable the anthy use flag for uim.

Other than that, have to say that the interface for UIM is a lot better. The only thing is that the input method switching still doesn't work, but I think it's because some of the IM method change key settings are duplicated in the default config under the global and anthy key binding settings (zenkaku-hankaku / shift-meta / alt-shift). Gotta figure out how to fix this, because it seems trivial..

----------

## frostschutz

 *frostschutz wrote:*   

> Now onto some problems I have: After doing a fresh Gentoo install, Japanese input stopped working with xterm/urxvt and OpenOffice. When pressing ctrl+space, the input window comes up, however inserting the Japanese text into the application does not work. For example, when typing something like ひらがな, the result that gets pasted into the application is "*c2ccc", along with some special characters. However, it's not that the applications can't handle Japanese - copy&pasting Japanese text works and gets displayed properly. So my guess is that SCIM sends crap or uses wrong charset (whole system runs in UTF-8 mode as per this Howto though).

 

There's a patch for this problem in Bug 142056

----------

## arathalion

ok, well, ive read through the thread, and it has helped fix a few problems.

but

i cant get katakana with scim

and uim-anthy does not exist, even though i emerged anthy first, as it says above to do.

i cant get input in firefox or ooffice. playing around with the locals i might have fixed ooffice, but i didnt get a chance to test it as azureus decided that it wanted to be in jap, when i didnt want it to be (im only learning atm,) so i changed it back... oh, and it was slowing everything down aswell.

the only things ive tried it in otherwise was xterm (didnt work) leafpad and gaim (both did).

oh, im using enlightenment... but im not sure if thats effecting everything (though i am getting an error with something at the start... something about something not being found... not sure whats coursing that yet)

also, should i get ~x86 versions of anthy uim and scim... and i think i missed something... what is skim?

----------

## Sudrien

 *arathalion wrote:*   

> ok, well, ive read through the thread, and it has helped fix a few problems.
> 
> but
> 
> i cant get katakana with scim
> ...

 

SKIM is the SCIM equivalent for KDE, I believe.

For a terminal, I'd suggest either XFCE's or Gnome's terminal offerings (both are GTK+-based).

GTK+ programs generally won't slow down, since they already work with UTF8 internally.

-Sud.

----------

## arathalion

thanks, though i discovered that that line made several programs appear in jap... probably because my language is en_AU.UTF-8.

----------

## zecg

Firstly, thank you all a lot for this thread. My experience is as follows:

I currently have:

KDE 3.5.6

qt 3.3.6-r4

Gtk+ 2.10.9

scim 1.4.5-r1

scim-anthy 1.0.0

scim-qtimm 0.9.4

anthy-ss 8517

Everything works as expected. But I have some questions:

1. someone already asked, but there was no response and the Google is not helpful in this case. What is the difference between anthy and anthy-ss? Since anthy-ss has a higher version number, I installed that. Both work as expected in the above combination.

2. scim 1.2.2 does not work with Gtk. Can someone confirm this?

3. skim-scim-anthy package does not work at all in providing an interface to anthy (it makes skim crash)

Thanks for any and all replies.

----------

## frostschutz

 *zecg wrote:*   

> 2. scim 1.2.2 does not work with Gtk. Can someone confirm this?

 

Where do you get that version number from? I'm using (due to some bug slightly modified) scim 1.4.5-r1 which works for me.

I don't use anything KDE at all so I can't help you with skim unfortunately. As for anthy-ss, I don't know the difference either.

----------

## zecg

 *frostschutz wrote:*   

>  *zecg wrote:*   2. scim 1.2.2 does not work with Gtk. Can someone confirm this? 
> 
> Where do you get that version number from? I'm using (due to some bug slightly modified) scim 1.4.5-r1 which works for me.

 

Sorry, it's the version number of scim-anthy. That is the thing that doesn't work.

----------

## frostschutz

Are you talking about this bug? In that case, removing the imengine patch from the scim-1.4.5-r1 ebuild and then re-emerging scim fixed the problem for me. See also my prior reply (9 Jan 2007) to this thread. It works perfectly fine for me now.

----------

## zecg

No, it's not that bug. With scim-anthy 1.2.2 (or skim-scim-anthy 1.2.2) there is an "anthy" section in my scim config, but scim crashes if I click on it.

Also, another problem: kopete segfaults if I receive any messages (no matter what application has focus) while the anthy IM is active.

----------

## b0b0

I just updated to uim-1.2.1 after it was stabilised in portage, and now my Kanji conversion no longer works.  I use Anthy as my dictionary, for which I compiled uim with the proper use flag.  Is anyone else having this problem?

----------

## newtonian

 *b0b0 wrote:*   

> I just updated to uim-1.2.1 after it was stabilised in portage, and now my Kanji conversion no longer works.  I use Anthy as my dictionary, for which I compiled uim with the proper use flag.  Is anyone else having this problem?

 

What version of qt is your system using?

Anyone have any luck with qt4 and Japanese input?

I checked out the Japanese gentoo sites and they generally tell you to downgrade to qt3.

System upgrades to qt4 invariably kill my Japanese input.

Cheers,

----------

## ZmjbS

 *newtonian wrote:*   

> Anyone have any luck with qt4 and Japanese input?
> 
> I checked out the Japanese gentoo sites and they generally tell you to downgrade to qt3.

  The Qt immodule project added input method module support to Qt, but only version 3. Unfortunately, there doesn't seem to have been much happening for version 4 since August 2004.

----------

## newtonian

 *ZmjbS wrote:*   

>  *newtonian wrote:*   Anyone have any luck with qt4 and Japanese input?
> 
> I checked out the Japanese gentoo sites and they generally tell you to downgrade to qt3.  The Qt immodule project added input method module support to Qt, but only version 3. Unfortunately, there doesn't seem to have been much happening for version 4 since August 2004.

 

Actually I got Japanese input working very nicely with qt4.

I was going to write a howto but wanted to get used to setting

it up on a few computers first.  I followed the uim+anthy 

wiki instructions on the Japanese gentoo site.

http://wiki.gentoo.gr.jp/index.php?%5B%5B%C6%FC%CB%DC%B8%EC%C6%FE%CE%CF%C0%DF%C4%EA%BB%F6%CE%E3%BD%B8%2Fuim%2Banthy%5D%5D

Cheers,

----------

## ZmjbS

 *newtonian wrote:*   

> Actually I got Japanese input working very nicely with qt4.
> 
> I was going to write a howto but wanted to get used to setting
> 
> it up on a few computers first.  I followed the uim+anthy 
> ...

 

But that site doesn't seem to mention Qt 4 in particular. In fact, as I understand, the immodules (immqt and immqt-bc) mentioned are only for Qt 3.

Are you using Qt 4 only, or both 3 and 4? Do you run many Qt applications? Are they linked statically to Qt?

I'm glad you've got things working! After fiddling around trying to fix things, my Qt input is now completely broken :-( Has anyone come across a good guide to Qt and immoduling?

----------

## newtonian

 *ZmjbS wrote:*   

> 
> 
> But that site doesn't seem to mention Qt 4 in particular. In fact, as I understand, the immodules (immqt and immqt-bc) mentioned are only for Qt 3.
> 
> Are you using Qt 4 only, or both 3 and 4? Do you run many Qt applications? Are they linked statically to Qt?
> ...

 

Actually, yes I'm using both qt3 and qt4.  Here are my use keywords:

```
USE="-gtk -gnome -ipv6 qt3 qt3support kde cjk nls immqt-bc -immqt unicode 
```

And I do everything in KDE.

----------

## newtonian

Actually if you look at the Japanese Wiki it says that you need these keywords to get it working

in KDE.

 *Quote:*   

> anthy immqt OR immqt-bc

 

then run:

```
emerge --update --deep --newuse world
```

Cheers,

----------

## ZmjbS

[quote="newtonian"] *ZmjbS wrote:*   

> Actually, yes I'm using both qt3 and qt4.  Here are my use keywords:
> 
> ```
> USE="-gtk -gnome -ipv6 qt3 qt3support kde cjk nls immqt-bc -immqt unicode 
> ```
> ...

 

Thanks for the information. I tried various setup combinations, but nothing worked. Good to know that it's working for someone, though.

----------

## newtonian

 *newtonian wrote:*   

>  *ZmjbS wrote:*   Actually, yes I'm using both qt3 and qt4.  Here are my use keywords:
> 
> ```
> USE="-gtk -gnome -ipv6 qt3 qt3support kde cjk nls immqt-bc -immqt unicode 
> ```
> ...

 

 :Sad:    That's no good.  

Did you follow the Japanese howto on the following wiki?

http://wiki.gentoo.gr.jp/index.php?%5B%5B%C6%FC%CB%DC%B8%EC%C6%FE%CE%CF%C0%DF%C4%EA%BB%F6%CE%E3%BD%B8%2Fuim%2Banthy%5D%5D

Are running everything in KDE?

Did you run 

```
emerge --update --deep --newuse world
```

----------

## newtonian

This setup works with the newer qt 4 and has better looking, more intelligent word engine than the setup in this howto.

For KDE do this:

Add the following to you USE keywords.

 *Quote:*   

> qt3 qt3support anthy kde cjk nls immqt-bc -immqt

 

```
emerge uim
```

```
emerge --update --deep --newuse world
```

Add the following to ~/.xinitrc

 *Quote:*   

> export XMODIFIERS="@im=uim"
> 
>  export GTK_IM_MODULE="uim"
> 
>  export QT_IM_MODULE="uim"
> ...

 

Add the following to ~/.xprofile (when booting from KDM into KDE)

 *Quote:*   

>  export XIM="uim-xim"
> 
>  export XMODIFIERS="@im=uim"
> 
>  export GTK_IM_MODULE="uim"
> ...

 

Restart KDE, might be a good idea to reboot the whole system to be sure.

```
/sbin/shutdown -r now
```

I've got this working on my gentoo system and it works great.  

I haven't followed the howto listed above on a new gentoo install so I'm not sure it works.

I could be missing something  :Confused: .  I'll test it out when I get a little more time and report back.

Cheers,

Change Log

Added a note about logging in from KDM to KDE April 7th, 2007Last edited by newtonian on Sat Apr 07, 2007 11:44 am; edited 1 time in total

----------

## ZmjbS

 *newtonian wrote:*   

>  *ZmjbS wrote:*   Thanks for the information. I tried various setup combinations, but nothing worked. Good to know that it's working for someone, though. 
> 
>  :(   That's no good.

 

No, not at all... :-(

 *newtonian wrote:*   

> Did you follow the Japanese howto on the following wiki?
> 
> http://wiki.gentoo.gr.jp/index.php?%5B%5B%C6%FC%CB%DC%B8%EC%C6%FE%CE%CF%C0%DF%C4%EA%BB%F6%CE%E3%BD%B8%2Fuim%2Banthy%5D%5D

 

No, originally (I guess it's gettig close to a year now) I followed parts of this forum thread, parts of the uim webiste and parts of some other resources I found on the web. At first pretty much everything worked swimmingly, but then GTK+ stopped working after some upgrade. With help from the uim mailing list I got GTK+ working again but soon after Qt quit on me! *sigh*

 *newtonian wrote:*   

> Are running everything in KDE?

 Nope, pretty much the only Qt application that I use is Opera ... but not having IM input working in your browser is a pretty fair drawback (not enough to drive me to Firefox, though).

 *newtonian wrote:*   

> Did you run 
> 
> ```
> emerge --update --deep --newuse world
> ```
> ...

 

Oh, countless times ... :-(

Thanks a lot for the description in your second post, by the way! I'm trying a few things out now.

A few comments, though:

 *newtonian wrote:*   

> This setup works with the newer qt 4 and has better looking, more intelligent word engine than the setup in this howto.

 But the conversion engine improvement is due to an upgrade in Anthy rather than Qt, right?

 *newtonian wrote:*   

> Add the following to you USE keywords.
> 
>  *Quote:*   qt3 qt3support anthy kde cjk nls immqt-bc -immqt 

 

I tried adding these to my make.conf but --newuse --deep didn't change anything. Well, apart from kde which I omitted since I prefer not using a desktop environment. I figured it shouldn't matter since the immodule interfaces with Qt, not KDE (I also have -gnome and that doesn't seem to affect the input).

Also, just in case you're interested: qt3support, and immqt* are local use flags for Qt 4 and Qt 3, respectively, and anthy is a local flag for uim so these can be set in /etc/portage/package.use. I did try including them in make.conf but the output from --newuse --deep was the same.

My /etc/portage/package.use includes:

 *Quote:*   

> =x11-libs/qt-4* pch qt3support
> 
> =x11-libs/qt-3* immqt-bc
> 
> app-i18n/uim anthy prime canna

 

Regarding the environment variables: Are you sure you have to add the environment variables to both files? Every documentation that I've seen only requires you to do it in one place where they are sure to be read. I have mine in ~/.xinitrc. It works for GTK+ and XIM and the variables all show up in the environment. I'm recompiling some stuff now, but just in case I'll later give ~/.xprofile a shot.

Also, are you sure you are using the Qt immodule? If I fire up uim-xim, then conversion naturally works everywhere in X (you can even choose whether to use the GTK+ or Qt candidate windows by setting the UIM_CANDWIN_PROG variable to uim-candwin-{gtk,qt}). The reason why I don't use uim-xim is that it causes a huge lag when I start a rxvt-unicode terminal. mlterm is much better, so I may just end up having to switch to mlterm and use XIM for Qt applications.

Finally, a long shot, but I don't suppose you have dev-libs/dbus-qt3-old installed?

----------

## newtonian

 *Quote:*   

> But the conversion engine improvement is due to an upgrade in Anthy rather than Qt, right? 

 

Yes, this is a uim+anthy improvement that makes the difference, not Qt.

 *Quote:*   

> Regarding the environment variables: Are you sure you have to add the environment variables to both files? Every documentation that I've seen only requires you to do it in one place where they are sure to be read. I have mine in ~/.xinitrc. It works for GTK+ and XIM and the variables all show up in the environment. I'm recompiling some stuff now, but just in case I'll later give ~/.xprofile a shot. 

 

The Japanese Wiki says to put them in both places if you boot into KDE from KDM.

 *Quote:*   

> Also, are you sure you are using the Qt immodule? 

 

I don't think so.  Would that be used in Qt?

```
emerge -pv qt

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R   ] x11-libs/qt-4.2.2  USE="cups jpeg mysql opengl png qt3support* zlib -accessibility -dbus -debug -doc -examples -firebird -gif -glib -mng -nas -nis -odbc -pch -postgres -sqlite -sqlite3 -xinerama" INPUT_DEVICES="-wacom" 0 kB

```

 *Quote:*   

> Finally, a long shot, but I don't suppose you have dev-libs/dbus-qt3-old installed?

 

I checked and it is not installed.

----------

## ZmjbS

 *newtonian wrote:*   

> The Japanese Wiki says to put them in both places if you boot into KDE from KDM.

 

Odd...

 *newtonian wrote:*   

>  *Quote:*   Also, are you sure you are using the Qt immodule?  
> 
> I don't think so.  Would that be used in Qt?
> 
> ```
> ...

 

Yes, the Qt and GTK+ immodules take care of redirecting input from Qt and GTK+ appliations to the input method set in {GTK,QT}_IM_MODULE (in our case: uim). If your Qt immodule is broken like mine, uim-xim (which you start in ~/.xprofile) should still catch the keyboard input and send it to uim.

Some history: Qt 3 came without an immodule so some enterprising individuals took it upon themselves to create a patch, the immodule-qt. If you emerge Qt 3 with the "immqt-bc" flag, emerge automatically applies the binary compatible (hence the bc) version of the patch.

So, essentially, Qt (version 3, at least) cannot redirect input to an input method without the patch.

I'm not sure what Qt 4 support for the immodule is like. I figure that the qt3support flag may be to provide that sort of support, but that is just a guess.

To see the Qt 3 flags, you can either run "emerge -pv =x11-libs/qt-3*" or "equery uses =x11-libs/qt-3*". To check if you are using the uim-xim bridge as opposed to the Qt immodule in Qt appliations, you'd probably have to stop uim-xim or start up without it. But don't worry about that, you've been extremely helpful so far. I'm pretty paranoied about the quirks in the immodules. It doesn't matter on my broken system, but I wouldn't want to break yours too...

 *newtonian wrote:*   

>  *Quote:*   Finally, a long shot, but I don't suppose you have dev-libs/dbus-qt3-old installed? 
> 
> I checked and it is not installed.

 

Oh, well. It was a long shot. Thanks for checking!

----------

## newtonian

Hi-

I ran that check like you asked.  qt3 is installed and using immqt-bc.

qt4 is installed too, but doesn't use immqt-bc.

Let me know if you'd like me to check anything else.

```
emerge -pv =x11-libs/qt-3*

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R   ] x11-libs/qt-3.3.6-r4  USE="cups immqt-bc mysql opengl -debug -doc -examples -firebird -gif -immqt -ipv6 -nas -nis -odbc -postgres -sqlite -xinerama" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB
```

```
emerge -pv =x11-libs/qt-4*

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R   ] x11-libs/qt-4.2.2  USE="cups jpeg mysql opengl png qt3support* zlib -accessibility -dbus -debug -doc -examples -firebird -gif -glib -mng -nas -nis -odbc -pch -postgres -sqlite -sqlite3 -xinerama" INPUT_DEVICES="-wacom" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB
```

Cheers,

----------

## jarealist

The latest portage version of qt3 needs the immqt/immqt-bc patch updated to work with it.

See bug report: https://bugs.gentoo.org/show_bug.cgi?id=169852

Seems there is no one to maintain the patch or the person that does maintain it is busy at the moment.

Just thought I would ask in this post if there is someone that could update the patch to work with qt-3.3.8.

----------

## hokstein

I followed the instructions, and now I have skim running. But it doesn't show uim-anthy as an option. It shows these options for Japanese:

UIM-canna

UIM-skk

UIM-tcode

UIM-trycode

UIM-tutcode

None of these work. Any ideas?

----------

## ZmjbS

 *hokstein wrote:*   

> I followed the instructions, and now I have skim running. But it doesn't show uim-anthy as an option.

 

Do you have 'anthy' (or, possibly in your case: 'app-i18n/skim-scim-anthy') installed?

----------

## hokstein

 *ZmjbS wrote:*   

>  *hokstein wrote:*   I followed the instructions, and now I have skim running. But it doesn't show uim-anthy as an option. 
> 
> Do you have 'anthy' (or, possibly in your case: 'app-i18n/skim-scim-anthy') installed?

 

I have anthy 8700b. I tried installing scim-anthy 1.3.0, but the ebuild fails. I filed a bug for it here. I tried installing the previous version, scim-anthy 1.2.2, but for some strange reason portage pulls scim-anthy 1.3.0 as a dependency.  :Confused: 

----------

## ZmjbS

 *hokstein wrote:*   

> I have anthy 8700b. I tried installing scim-anthy 1.3.0, but the ebuild fails.

 Again, what about 'skim-scim-anthy'? You are running skim (not scim), right?

 *hokstein wrote:*   

> I filed a bug for it here. I tried installing the previous version, scim-anthy 1.2.2, but for some strange reason portage pulls scim-anthy 1.3.0 as a dependency. :?

 

Looks like you may have to wait for the bug to be fixed before proceeding on skim. In the meantime, you may wish to give uim a go. See the Input Methods article on the Gentoo Wiki for installation instructions.

----------

## hokstein

 *ZmjbS wrote:*   

>  *hokstein wrote:*   I have anthy 8700b. I tried installing scim-anthy 1.3.0, but the ebuild fails. 
> 
> Again, what about 'skim-scim-anthy'? You are running skim (not scim), right?

 

skim-scim-anthy depends on scim-anthy.

 *ZmjbS wrote:*   

>  *hokstein wrote:*   I filed a bug for it here. I tried installing the previous version, scim-anthy 1.2.2, but for some strange reason portage pulls scim-anthy 1.3.0 as a dependency.  
> 
> Looks like you may have to wait for the bug to be fixed before proceeding on skim. In the meantime, you may wish to give uim a go. See the Input Methods article on the Gentoo Wiki for installation instructions.

 

I'll try that. Thanks!

----------

## frostschutz

scim-anthy-1.3.0 compiles fine for me. I'm not using KDE though, so maybe it's the kde useflag?  :Confused: 

Maybe it's because I use an unmodified version of scim-1.4.5-r1 (without the Gentoo imengine patch, which breaks scim for me).

----------

## newtonian

I did an emerge world recently and everything compiled fine for me on KDE.

In case anyone is interested here is what I'm running anthy wise:

```
mammoth shop # emerge --search anthy

Searching...

[ Results for search key : anthy ]

[ Applications found : 4 ]

*  app-i18n/anthy

      Latest version available: 8300

      Latest version installed: 7900

      Size of files: 3,618 kB

      Homepage:      http://anthy.sourceforge.jp/

      Description:   Anthy -- free and secure Japanese input system

      License:       GPL-2

*  app-i18n/scim-anthy

      Latest version available: 1.2.2

      Latest version installed: 1.2.2

      Size of files: 633 kB

      Homepage:      http://scim-imengine.sourceforge.jp/index.cgi?cmd=view;name=SCIMAnthy

      Description:   Japanese input method Anthy IMEngine for SCIM

      License:       GPL-2

*  app-i18n/skim-scim-anthy

      Latest version available: 1.2.2

      Latest version installed: 1.2.2

      Size of files: 911 kB

      Homepage:      http://scim-imengine.sourceforge.jp/index.cgi?cmd=view;name=SCIMAnthy

      Description:   SKIM configuration panel for scim-anthy

      License:       GPL-2

```

----------

## Magnum44

Hello, I'm having problems with skim panel applet on KDE. The thing is that I don't know what the hell did I upgrade/change but now when I click on skim with the left mouse button, the list that once had the different IMEngines (Japanese, Spanish, English...) now it's empty! And skim doesn't throw any exception or error message.

I've checked the config and I have selected the IMEngine Spanish and Japanese, but none of them appears in the list. I'm writing in spanish but sometimes I write in japanese, so I need both. Another thing is that the accents stop working fine since this happens, now I get `a instead of á but just in KDE applications... in thunderbird and firefox they work fine.

Any ideas what is wrong? THANKS!

----------

## emilio_wuerges

I'm having some trouble to put japanese input on java 32 bits and firefox 32 bits in my amd64 gentoo.

64 bits native apps work. I followed this guide to do so.

What should I do?

----------

## Xamindar

 *emilio_wuerges wrote:*   

> I'm having some trouble to put japanese input on java 32 bits and firefox 32 bits in my amd64 gentoo.
> 
> 64 bits native apps work. I followed this guide to do so.
> 
> What should I do?

 

Interesting, I'll have to test that.  What 32 bit programs are out there?  Maybe limewire?  I'll test and see if i have the same problem.  And Why are you using firefox 32 bits?

----------

## ZmjbS

 *Magnum44 wrote:*   

> Any ideas what is wrong? THANKS!

 

It's been a while. Is this still a problem?

Sounds like the Qt immodule is giving you trouble. Not sure what you should do to fix it. Guess you could try different USE flags before going to the skim people for help (if you haven't already).

----------

## kiss-o-matic

Am I the only one that got this to work by using the "anthy" USE flag?   Following the tutorial in the original post on my new system didn't work.  USE="anthy" emerge uim fixed it.  :Confused: 

----------

## ZmjbS

 *kiss-o-matic wrote:*   

> Am I the only one that got this to work by using the "anthy" USE flag?   Following the tutorial in the original post on my new system didn't work.  USE="anthy" emerge uim fixed it. :?

 

The original post is about three years old.

Venturing a guess as to why you couldn't use uim without the anthy flag, I'd say that probably you hadn't set a default input method, but the flag may have done it (I looked through the ebuild, but didn't see anything that indicated how that would have happened, though, except for the --enable-dict option). Remember, though: that was just a guess.

----------

## Moncader

I'm having the issue with 32 bit library programs, firefox specifically. (actually, skype 32 bit works)

First off, I'm using 32 bit firefox because 64 bit flash sucks  :Smile: 

I've tried quite almost every combination of everything out there... However, SCIM DOES work (sometimes.... scim doesn't really like me for anything) with firefox... so it would seem to be a uim bug somehow...

**UPDATE!

NEVER mind... I've fixed it... Fooling around more with environment variables got it... LC_CTYPE must be ja_JP.utf8...

A note to people... when you shoot off 'locale -a' and it returns en_US.utf8 or whatever... make sure you use en_US.utf8, NOT en_US.utf-8 (notice the dash) That's what got me...

----------

## friesia

As from what I see, is it impossible to you these input methods in Qt4 apps. Am I mistaken?

It's working fine for me in GTK and Qt3. My only Qt4 application is Psi 0.11, and I just installed qmpdclient to make sure that scim really has problems with Qt4.

----------

## Kate Monster

I followed the guide and I have Japanese fonts and Japanese input working great. But now I want to setup a new user account with KDE(3.5. :Cool:  in Japanese. When I go into kcontrol -> Regional & Accessibility -> Country/Region & Language, it says English is the only language available. Do I need to re-emerge KDE for this to work?

```
C

POSIX

en_US.utf8

ja_JP.utf8
```

```
LANG=

LC_CTYPE="en_US.utf8"

LC_NUMERIC="en_US.utf8"

LC_TIME="en_US.utf8"

LC_COLLATE="en_US.utf8"

LC_MONETARY="en_US.utf8"

LC_MESSAGES="en_US.utf8"

LC_PAPER="en_US.utf8"

LC_NAME="en_US.utf8"

LC_ADDRESS="en_US.utf8"

LC_TELEPHONE="en_US.utf8"

LC_MEASUREMENT="en_US.utf8"

LC_IDENTIFICATION="en_US.utf8"

LC_ALL=en_US.utf8
```

----------

## newtonian

 *Xaero wrote:*   

> I followed the guide and I have Japanese fonts and Japanese input working great. But now I want to setup a new user account with KDE(3.5. in Japanese. When I go into kcontrol -> Regional & Accessibility -> Country/Region & Language, it says English is the only language available. Do I need to re-emerge KDE for this to work?
> 
> ```
> C
> 
> ...

 

Did you compile kde-i18n with the ja linguas variable set?

Cheers,

----------

## jarealist

I have skim installed in KDE-3.5.9 and was working fine until my wife noticed yesterday she couldn't input anything.  It's mainly for her.  The skim panel applet icon was visible but wouldn't detect any qt app like konsole or even Thunderbird.  No selection for keyboard, anthy, etc was available, just a blank line over the applet.

Making a long story short, the problem was related to me using the "entrance" display manager (e17)  and then logging in to kde.  When I switched back to booting/using kdm then skim worked properly.

Shouldn't one be able to use any display manager and then log into kde and skim work?

I can live with it, but entrance was prettier.

----------

## eddo

Had lots of fun and games getting everything working problem since I updated my gcc to 4.3 on  a new install.  Anyway, this were the steps I took to get everything working on my KDE install

NOTES 

- if running a strict kde/qt system, make sure to include lines for scim/scim-anthy in package.use to include the "gtk" flag, otherwise Firefox/pidgin/etc won't work.

- adding the "export [..]=scim" lines to ~/.xinitrc WILL NOT WORK, they must be added to /etc/profile.d/local.sh (you might have to create this file)

1) emerged uim

2) created /etc/profile.d/local.sh

2) added 

```

export XMODIFIERS=@im=SCIM

export GTK_IM_MODULE=scim

export QT_IM_MODULE=scim
```

 to /etc/profile.d/local.sh

3) unmasked/emerged scim-1.4.7

4) unmasked/installed scim-anthy-1.2.6 (this should install skim-scim-anthy to 1.2.4 at the same time)

5) unmasked/emerged kasumi-2.3-r1 (any earlier version fails to compile)

やった！

I can't be the only Japanese typing person running a KDE/QT only system on gcc-4.3, so hopefully this may help  :Very Happy: 

----------

## newtonian

Thanks for the tip.  Instead of /etc/profile.d/local.sh ~/.xprofile seems to do the trick for me:

```
cat ~/.xprofile
```

```
LANG='en_US.UTF-8'

export XMODIFIERS=@im=SCIM

export GTK_IM_MODULE=scim-bridge

export QT_IM_MODULE=scim-bridge

exec startkde

```

Cheers,

----------

## newtonian

 *jarealist wrote:*   

> I have skim installed in KDE-3.5.9 and was working fine until my wife noticed yesterday she couldn't input anything.  It's mainly for her.  The skim panel applet icon was visible but wouldn't detect any qt app like konsole or even Thunderbird.  No selection for keyboard, anthy, etc was available, just a blank line over the applet.
> 
> Making a long story short, the problem was related to me using the "entrance" display manager (e17)  and then logging in to kde.  When I switched back to booting/using kdm then skim worked properly.
> 
> Shouldn't one be able to use any display manager and then log into kde and skim work?
> ...

 

I'm just guessing here but to me it sounds like the following isn't getting read by your new display manager.

```

LANG='en_US.UTF-8'

export XMODIFIERS=@im=SCIM

export GTK_IM_MODULE=scim-bridge

export QT_IM_MODULE=scim-bridge

exec startkde 
```

with kdm/kde I have this in .xprofile, perhaps you could try moving it to .bashrc for your display manager?

----------

## eddo

 *newtonian wrote:*   

> Thanks for the tip.  Instead of /etc/profile.d/local.sh ~/.xprofile seems to do the trick for me:
> 
> ```
> cat ~/.xprofile
> ```
> ...

 

Interesting, I wonder why the discrepancy?

----------

## newtonian

 *eddo wrote:*   

> 
> 
> Interesting, I wonder why the discrepancy?

 

Could it be that KDM reads .xprofile instead of .xinitrc or perhaps calls .xprofile afterwards?

If you are talking about /etc/profile.d/local.sh as opposed to .xprofile - I'm guessing they both work as I'm running KDE + KDM like you.  

Cheers,

----------

## KK_r

You're right newtonian, KDM and GDM don't read .xinitrc at all unless you create an entry that does exactly that (as I have done).

----------

## eddo

Thing is I don't use a login manager, just a "startx" from the console, strange why .xinitrc is ignored.

----------

## TheLGT

 *eddo wrote:*   

> Had lots of fun and games getting everything working problem since I updated my gcc to 4.3 on  a new install.  Anyway, this were the steps I took to get everything working on my KDE install
> 
> NOTES 
> 
> - if running a strict kde/qt system, make sure to include lines for scim/scim-anthy in package.use to include the "gtk" flag, otherwise Firefox/pidgin/etc won't work.
> ...

 

Thanks for this explanation, it worked perfecly well for me now. Same situation but gcc-4.1.2. And a lot of time spent recompiling my 997 packages after migrating to UTF-8.

One detail to precise: it doesn't allow input in every applications,  so the best way to test is by typing in a Firefox window.

ありがとう

----------

## valuial

Running on an amd64 system:

Input works fine - except firefox.

Using /etc/xprofile for the exports:

```
lux1 ~ $ cat /etc/xprofile

export XMODIFIERS=@im=SCIM

export XMODIFIER=@im=SCIM

export GTK_IM_MODULE=scim

export QT_IM_MODULE=scim
```

KDE 3.5 (current stable version)

mozilla-firefox-bin-2.0.0.17

anthy-9100d

scim-1.4.5-r1

scim-anthy-1.2.4

(I have trouble with firefox crashing in a japanese locale environment, not sure if this is related, the input problem is in other environments as well, scim/anthy just recognizes no keypresses at all. Using a japanese keyboard with the special keys for changing input works in other applications)

Any idears what the problem might be, I'm kinda stuck here...

----------

## jarealist

Could someone explain to me why they think the following works:

Note: both kde-3.1.5 and kde-4.1.3 installed.

After upgrading to the latest release of uim (1.5.4-r2), I was unable to log into kde4.  I was dumped back out to kdm log-in box.  uim was compiled with both qt3 and qt4 support.

I recompiled uim with qt3 support "only" and was able to log into kde4.  Also, skim still works fine with kde4 apps (console, krusader, etc).

Question:  It appears the qt4 USE flag is/was unnecessary.  Is it possible skim works in kde4 because qt-4.4.2 is compiled with the qt3support USE flag?  I really hate to recompile qt-4.4.2, with -qt3support, to find out.  Besides, everything is working fine.  Anyone else experienced this behavior with uim-1.5.4-r2 and kde4?

----------

## ZmjbS

 *jarealist wrote:*   

> Could someone explain to me why they think the following works:
> 
> ...
> 
> 

 

It might be better to start a new topic for this...

----------

## Tristanm

I can't install scim-uim. The problem is that it requires a version of uim < 1.5, and those versions don't seem to be compatible with gnome 2.26. Since I am running 2.26, the compile failed with errors that looked like they were coming from trying to find something in gnome applet. I tried to use an edited version of the latest scim-uim ebuild to remove the uim < 1.5 requirement, but then scim-uim failed with the same gnome problems. Shall I post the errors?

----------

## ZmjbS

 *Tristanm wrote:*   

> I can't install scim-uim. The problem is that it requires a version of uim < 1.5, and those versions don't seem to be compatible with gnome 2.26.

 

Which version of scim-uim are you using? Have you tried just using uim without scim? Is there a big difference in the interface? If you really want the interface, you could give SCIM a try (without the uim backend).

----------

## Tristanm

There are only two versions of scim-uim in portage, and I've tried both. Both require uim less than version 1.5. Versions less than 1.5 fail on my system.

I got scim working, though the toolbar lists way more languages than I want/need. Since I need only Canna and direct input. Is there a way to remove just the stuff like hangul, pinyin, latin and the others I don't need?

----------

## ZmjbS

 *Tristanm wrote:*   

> Is there a way to remove just the stuff like hangul, pinyin, latin and the others I don't need?

 

I'm pretty sure there is. I'm, however, a uim user so I can't help you with that.

----------

## kiss-o-matic

It is worth noting, and this is very annoying, that I've built two machines recently and running scim the first time, the front panel was invisible.  I kept restarting thinking the machine was all cocked up, but when I hit CTRL+SPACE in Firefox, it appeared. :/  Yeah, I should've remembered the second time, but here I am...

----------

## dabicho

Hello.

What should I input in the "Specify canna server" if I am using canna?

Canna uses a unix domain socket, as shown by 

 netstat --listen  -np|grep canna

unix  2      [ ACC ]     STREAM     LISTENING     18710    4507/cannaserver    /tmp/.iroha_unix/IROHA

I can not get kanji because of that

----------

## renketsu

I can't find /etc/xprofile. Is this a file that has to be created? If so, is there anything else I need to do to enable it?

----------

## SuperBlockKiller

Hiho,

I was trying to configure japanese input and followed the wiki (which is more or less the same as the manual in this thread) and tried to start it.

when trying to start 'scim -d' it tells me:

ERROR: in list-ref: out of range: 2

this is the same error that appears when trying to start uim-xim (what a coincidence...)

Anyway, I'm not quite sure that the export of the variables did work quite right.

I put the export stuff inside ~/.xinitrc _and_ /etc/profiles

If someone knows what the error should tell me and what I've done wrong, I would be very pleased  :Very Happy: 

lg

----------

## kaneohe

 *SuperBlockKiller wrote:*   

> when trying to start 'scim -d' it tells me:
> 
> ERROR: in list-ref: out of range: 2

 

I experience this same error as well. scim will not start.

----------

## ZmjbS

 *kaneohe wrote:*   

>  *SuperBlockKiller wrote:*   when trying to start 'scim -d' it tells me:
> 
> ERROR: in list-ref: out of range: 2 
> 
> I experience this same error as well. scim will not start.

 

Have you tried uim?

----------

## Satoshi

Anyone know how I can make Anthy use a Dvorak layout? Searching Google or the forums got me nothing.

----------

## ZmjbS

 *Satoshi wrote:*   

> Anyone know how I can make Anthy use a Dvorak layout? Searching Google or the forums got me nothing.

 

A) You want different input methods to use different keyboard layouts?

B) Wouldn't this be better suited in a thread of its own?

----------

## kiss-o-matic

There's a thread on how to enable Japanese.  Yeah, a single emerge would be nice, but the truth is it requires a few packages, and environment variables (which can be set in a number of ways, depending on the users preference.  Not to mention there's some KDE/Gnome differences.  It's pretty easy though, all things considered.... although I'm having an issue right now w/ it.

----------

## nixnut

merged some posts above

----------

## Slippery Jim

Okay, I'm configured with cjk, nls and unicode USE flags. I have a Japanese locale in my list of locales. I'm using gnome. I have lots of fonts installed. I can use the character map in the Accessories menu to drag and drop hiragana into my terminal. No problems so far. It would be a lot more convenient if I could just change my keymap though, and type directly.

In the System Preferences menu, I have a Keyboard Preferences item, and when I open this, I have a choice of many different layouts for many different languages. One set of layouts is under the Japanese heading. These are:

Japanese

Japanese (Kana)

Japanese (Kana 86)

Japanese (Mac)

Japanese (OADG 109A)

Japanese (PC-98xx Series)

The Kana choices give me katakana. The others just give me a regular english keyboard. None of them give me Hiragana. wtf? I can't think of any reason why there would not be a hiragana layout in this list. What am I missing?

----------

## ZmjbS

 *Slippery Jim wrote:*   

> The Kana choices give me katakana. The others just give me a regular english keyboard. None of them give me Hiragana. wtf? I can't think of any reason why there would not be a hiragana layout in this list. What am I missing?

 

An input method?

----------

## Slippery Jim

 *ZmjbS wrote:*   

>  *Slippery Jim wrote:*   The Kana choices give me katakana. The others just give me a regular english keyboard. None of them give me Hiragana. wtf? I can't think of any reason why there would not be a hiragana layout in this list. What am I missing? 
> 
> An input method?

 

Umm, I was going to use the "press the key and see the glyph appear" method. I guess this would be called "direct"?

Anyway, my point was kind of that if I can choose Afghani as my layout and get Afghani glyphs out of my keyboard (which I just tried and it works), then I should be able to do the same with Hiragana, right? That is, If I can find a layout...

----------

## ZmjbS

 *Slippery Jim wrote:*   

> Umm, I was going to use the "press the key and see the glyph appear" method. I guess this would be called "direct"?
> 
> Anyway, my point was kind of that if I can choose Afghani as my layout and get Afghani glyphs out of my keyboard (which I just tried and it works), then I should be able to do the same with Hiragana, right? That is, If I can find a layout...

 

No, not quite. The Japanese don't write text in either hiragana or katakana exclusively so don't expect much support for it. Unless you have the necessary language input keys, you'll be pretty much stranded even with the “right” layout.

Gentoo has no System Preferences menu. You'll find the mappings in /usr/share/X11/xkb/symbols/ and keycodes in /usr/share/X11/xkb/keycodes/. You could use these to create your own map or remap keys to the language input keys.

----------

## Slippery Jim

Alright. I installed uim, which pulls in anthy. Now, I can type <shift>+space, and when I, for example, type "c", I get:

c{hi}[1/1] 

How do I make it print a chi glyph?

----------

## ZmjbS

 *Slippery Jim wrote:*   

> How do I make it print a chi glyph?

 

chi<enter>: ち

----------

## Slippery Jim

 *ZmjbS wrote:*   

>  *Slippery Jim wrote:*   How do I make it print a chi glyph? 
> 
> chi<enter>: ち

 

I must still be missing a piece. When I hit enter, I just get the word chi, and a newline.

----------

