[SOLVED] Can't activate the SCIM on Firefox under CentOS 4.9

General support questions including new installations
machinariumer
Posts: 6
Joined: 2011/06/02 13:11:29
Contact:

[SOLVED] Can't activate the SCIM on Firefox under CentOS 4.9

Post by machinariumer » 2011/06/02 13:58:52

Hi, guys
Recently I have installed the SCIM on my CentOS 4.9. I could use SCIM with gedit, terminal etc, except the Firefox 3.6.17. I presses the Ctrl + Space, SCIM haven't shown.
After spending a couple of hours on googling, I knew Firefox was a gtk application and SCIM couldn't support the GTK application so well. But I have not found a complete
solution under CentOS 4. So how to fix it ? Any ideas will be appreciated. Thanks in advance.

Best Regards

JFHU

scottro
Forum Moderator
Posts: 2430
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

Re: Can't activate the SCIM on Firefox under CentOS 4.9

Post by scottro » 2011/06/02 15:37:18

No idea if this will work, don't have a 4.x install to test but you can try


XMODIFIERS=@'im=SCIM' GTK_IM_MODULE="scim" LC_CTYPE=en_US.UTF-8 firefox &

and see if that works.

(If that doesn't work, try en_US.UTF8 or en_US.utf8)

machinariumer
Posts: 6
Joined: 2011/06/02 13:11:29
Contact:

Re: Can't activate the SCIM on Firefox under CentOS 4.9

Post by machinariumer » 2011/06/03 01:37:46

[quote]
scottro wrote:
No idea if this will work, don't have a 4.x install to test but you can try


XMODIFIERS=@'im=SCIM' GTK_IM_MODULE="scim" LC_CTYPE=en_US.UTF-8 firefox &

and see if that works.

(If that doesn't work, try en_US.UTF8 or en_US.utf8)[/quote]
Thanks scottro. I tried, but it still doesn't work. Also I tried en_US.UTF8 and en_US.utf8. It didn't work either.
I have seen a post that said someone could configure the firefox use the fcitx and other applications use the scim. But I don't know how to do it.

User avatar
toracat
Forum Moderator
Posts: 7386
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

[SOLVED] Can't activate the SCIM on Firefox under CentOS 4.9

Post by toracat » 2011/06/03 04:18:36

Is that supposed to be this?:

XMODIFIERS="@im=SCIM"

Also try:

LC_CTYPE=ja_JP.UTF-8

machinariumer
Posts: 6
Joined: 2011/06/02 13:11:29
Contact:

Re: Can't activate the SCIM on Firefox under CentOS 4.9

Post by machinariumer » 2011/06/03 04:53:28

[quote]
toracat wrote:
Is that supposed to be this?:

XMODIFIERS="@im=SCIM"

Also try:

LC_CTYPE=ja_JP.UTF-8[/quote]
Thanks toracat. Oh, actually I have used XMODIFIERS="@im=SCIM". Why change the LC_CTYPE to ja_JP.UTF-8? I tried set LC_CTYPE=zh_CN.UTF-8, still failed to work. I just don't know the cause of the problem.

machinariumer
Posts: 6
Joined: 2011/06/02 13:11:29
Contact:

Re: Can't activate the SCIM on Firefox under CentOS 4.9

Post by machinariumer » 2011/06/03 05:44:29

OK. Now I figured out a solution. I edited the startup script of the firefox(/usr/bin/firefox). I added line [code]export GTK_IM_MODULE=xim[/code] after #! /bin/sh. Caution, It is xim, not scim. Then I can use SCIM with firefox perfectly. But I just don't know why. Maybe I should read some material about XIM and SCIM. If I know the reason, I will let you guys know. :-D

User avatar
toracat
Forum Moderator
Posts: 7386
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: Can't activate the SCIM on Firefox under CentOS 4.9

Post by toracat » 2011/06/03 05:54:42

LC_CTYPE=ja_JP.UTF-8 is probably not necessary (I used to have it on my system long time ago -- some Fedora days).

OK, I will share my super secret :-o Try this one:

GTK_IM_MODULE=xim

You can add environment variables to /usr/bin/firefox for convenience.

[EDIT: I see you found the solution while I was editing this post :-) ]

machinariumer
Posts: 6
Joined: 2011/06/02 13:11:29
Contact:

Re: Can't activate the SCIM on Firefox under CentOS 4.9

Post by machinariumer » 2011/06/03 08:51:49

[quote]
toracat wrote:
LC_CTYPE=ja_JP.UTF-8 is probably not necessary (I used to have it on my system long time ago -- some Fedora days).

OK, I will share my super secret :-o Try this one:

GTK_IM_MODULE=xim

You can add environment variables to /usr/bin/firefox for convenience.

[EDIT: I see you found the solution while I was editing this post :-) ][/quote]
:-D Thank you very much. But do you know the reason?

machinariumer
Posts: 6
Joined: 2011/06/02 13:11:29
Contact:

Re: Can't activate the SCIM on Firefox under CentOS 4.9

Post by machinariumer » 2011/06/03 12:06:55

OK. Now is my understanding.
With the setting GTK_IM_MODULE=scim, then Firefox(GTK+ 2.0 based application) will use the GTK IM Module the scim provides , however the GTK IM Module of scim is not compatible with Firefox, so when pressing Ctrl + Space, the scim won't show up. When set GTK_IM_MODULE equal xim, then GTK+2. 0 based application will use the XIM protocol to communicate with the XIM Server(SCIM in this case), and it works absolutely. Hope make myself clear and the above explanation is correct and it will help someone who come across the similar problems.


Best Wishes

Jfhu :-D

User avatar
toracat
Forum Moderator
Posts: 7386
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

Re: Can't activate the SCIM on Firefox under CentOS 4.9

Post by toracat » 2011/06/03 16:15:44

Thanks for posting not only a solution but also detailed explanation. I found the =xim line by digging through my old firefox files but totally forgot about it because I no longer need it on CentOS-5.

I will mark this thread [SOLVED] for posterity.

Post Reply

Return to “CentOS 4 - General Support”