You are not logged in.

#1 2009-03-25 05:06:07

tiachopvutru
Member
Registered: 2009-03-25
Posts: 9

Scim... howto?

I tried to enable typing Japanese by following this guide for installing Scim. I have done all the steps and see the keyboard icon on my system tray, but beside the ability to configure the program I do not know how to make it work. Nothing appears when I press Ctrl + Space.

Anyway, here's my ~/.xinitrc file:

#!/bin/sh

#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
#

export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE="scim"
export QT_IM_MODULE="scim"

numlockx &
# exec xterm
 exec gnome-session
# exec startkde
# exec startxfce4
# exec icewm
# exec openbox
# exec blackbox
# exec fluxbox
# exec ratpoison
# exec dwm
# ... or any other WM of your choosing ...

I added the line scim -f x11 -c simple -d to my session.

As for my locale:

[chucuoi@Tran ~]$ locale -a
C
POSIX
en_US
en_US.iso88591
en_US.utf8
ja_JP
ja_JP.eucjp
ja_JP.ujis
ja_JP.utf8
japanese
japanese.euc
zh_CN
zh_CN.gb18030
zh_CN.gb2312
zh_CN.gbk
zh_CN.utf8

I would appreciate any help on how to get it working. Thank you in advance. smile

Offline

#2 2009-03-25 05:46:15

ShinChyn
Member
From: Chinese->GuangDong->Shantou
Registered: 2008-08-23
Posts: 52

Re: Scim... howto?

Hi. I am new to Linux also, so I don't know where is the key to your problem.
 
  But scim (I install scim-pinyin) works fine on my machine, and here is my step, hope to help you.

   I use slim + lxde.
 
  I created a .xinitrc under my home folder (~), I write these in it:
 
      export LC_CTYPE="en_US.utf8"    // en_US.utf8 is my locale
    export XMODIFIERS=@im=SCIM   // SCIM should be uppercase
    export GTK_IM_MODULE="scim"   // scim-bridge should be better. But I changed to scim, and works fine
    export QT_IM_MODULE="scim"    // same as above
    scim -d                                    // start scim at start

        exec  startlxde                         // above code should placed before this line, otherwise scim won't start
 
  Then relogin and see the indicator of scim appears.

  See http://wiki.archlinux.org/index.php/Scim

Offline

#3 2009-03-25 05:52:57

ShinChyn
Member
From: Chinese->GuangDong->Shantou
Registered: 2008-08-23
Posts: 52

Re: Scim... howto?

And seems you have many locales.
 
  I just has 3 :
C
POSIX
en_US.utf8

  I only need English locale for my desktop. I read chinese file well.

  So, maybe you don't need so many locales.

Offline

#4 2009-03-25 21:54:43

tiachopvutru
Member
Registered: 2009-03-25
Posts: 9

Re: Scim... howto?

It still doesn't work...

Here's my new ~/.xinitrc file:

#!/bin/sh

#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
#

export LC_CTYPE="en_US.utf8"
export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE="scim"
export QT_IM_MODULE="scim"

numlockx &
# exec xterm
 exec gnome-session
# exec startkde
# exec startxfce4
# exec icewm
# exec openbox
# exec blackbox
# exec fluxbox
# exec ratpoison
# exec dwm
# ... or any other WM of your choosing ...

I have also disabled all the locales except for one

[chucuoi@Tran ~]$ locale -a
C
POSIX
en_US.utf8

Offline

#5 2009-03-26 01:56:51

ShinChyn
Member
From: Chinese->GuangDong->Shantou
Registered: 2008-08-23
Posts: 52

Re: Scim... howto?

From your ~/.xinitrc I didn't see
  scim -d
  Without "scim -d", scim won't start.

  Here is my step:
  1. pacman -S scim-pinyin     // I only need chinese pinyin imm
  2. Since I use slim as login manager and I use lxde as my desktop, I created a .xinitrc under my home, with follows in it:

    export LC_CTYPE="en_US.utf8"   
    export XMODIFIERS=@im=SCIM   
    export GTK_IM_MODULE="scim"   
    export QT_IM_MODULE="scim"   
    scim -d                                   
    exec  startlxde     

   3. Relogin and scim appears on the panel.

   Those are ALL my step to install scim. NO OTHER CHANGES NEEDED.
   Now, have a try yourself.

Offline

#6 2009-03-26 02:38:08

tiachopvutru
Member
Registered: 2009-03-25
Posts: 9

Re: Scim... howto?

Well I already have a similar line scim -f x11 -c simple -d added to my GNOME session.

However, I tried what you suggested anyway, and it didn't work.

Offline

#7 2009-03-26 09:46:40

Leigh
Member
From: USA
Registered: 2004-06-25
Posts: 533

Re: Scim... howto?

Hi, I been using scim for a long time. I use it for Chinese input. My normal system is in English.  I use it with scim-bridge in aur and it works really well for qt and gtk apps.

I use my ~/.bashrc file for scim and LC settings.
I don't set export LC_ALL, because it will override all other LC settings.
Anyway these are my settings...

export LANG="en_US.UTF-8"
export LC_CTYPE="zh_CN.UTF-8"

export QT_XFT=true
export GDK_USE_XFT=1
export XMODIFIERS="@im=SCIM"
export GTK_IM_MODULE="scim-bridge"
export QT_IM_MODULE="scim-bridge"
#export QT_IM_MODULE="xim"
export XIM_PROGRAM="scim -d"
#scim -f socket -c socket -d

The two commented out lines where used before I started using scim-bridge,  when I added the two scim-bridge lines...
export GTK_IM_MODULE="scim-bridge"
export QT_IM_MODULE="scim-bridge"

I'm a little bit fuzzy about when I actually commented out this line. It's been so long ago.
#scim -f socket -c socket -d

I do remember, without using scim-bridge, I needed..
export QT_IM_MODULE="xim"
export XIM_PROGRAM="scim -d"

hope it helps.

Last edited by Leigh (2009-03-26 10:04:29)


-- archlinux 是一个极好的 linux

Offline

#8 2009-03-26 13:02:16

ShinChyn
Member
From: Chinese->GuangDong->Shantou
Registered: 2008-08-23
Posts: 52

Re: Scim... howto?

When I use some other linux distro, scim problem has various solutions and I even don't know which one works.(Maybe they all work) Some says .bashrc should be changed, some say .xinitrc should be changed, others may say .profile should be changed. En, maybe they all work, but for me, they are difficult to choose. So I have to spend some time on scim when I swith a linux distro, or desktop environment.
 
  I can still remember the first time I install xubuntu. Scim took me 1 week. (Now the problem has been erased, if you apt-get scim-pinyin, everythings will get right, no other work needed)

  I am still new to linux, and scim too. The solution I suggest really does work in my machine with xfce and lxde.
So, some one with strongger ability should give you answer.

  Sorry, I can't get you out.

Offline

#9 2009-03-26 22:08:29

tiachopvutru
Member
Registered: 2009-03-25
Posts: 9

Re: Scim... howto?

Nope... still doesn't work. I have installed scim-bridge and moved the setting to /etc/profile instead of ~/.xinitrc. It still doesn't work.

Here is what my /etc/profile file looks like:

export LC_CTYPE="en_US.utf8"
export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE="scim-bridge"
export QT_IM_MODULE="scim-bridge"
export XIM_PROGRAM="scim -f x11 -c simple -d"
scim -f x11 -c simple -d

My problem is still this: there's a keyboard icon on my notification area of system tray, but it does nothing. When I left-click on it, nothing happens; when I right-click on it, I see several options and the only thing useful is "SCIM Setup."

I really don't see where I have done anything wrong for it to not work.

@ShinChyn: Don't worry about it. Actually, thank you for sticking with me so far. smile

Offline

#10 2009-03-26 22:49:04

Leigh
Member
From: USA
Registered: 2004-06-25
Posts: 533

Re: Scim... howto?

When I go home tonight, I'll try your settings on my machine using /etc/profile and see if it works. I'm not sure about your last two lines though. I think maybe this should be enough...
scim -d

Because after doing some research, I think I used the line below before switching to scim-bridge, although I'm not experiencing any problems with scim.
export XIM_PROGRAM="scim -d"


I work nights so it will be a while before I can try. I'll post when I find out something.

Also, I have always kept my settings local in my ~/user dir, but it shoulden't make any difference. Actually I would prefer the scim settings to be global anyway. I assume you have the input engines installed that you need, scim-tables, scim-pinyin, etc. ? Also you need to run the scim setup to config it for the inputs you need. Sorry about being vague, I'm not at my computer and it's been ages since I set up scim.

Last edited by Leigh (2009-03-27 01:22:28)


-- archlinux 是一个极好的 linux

Offline

#11 2009-03-27 07:27:00

Leigh
Member
From: USA
Registered: 2004-06-25
Posts: 533

Re: Scim... howto?

OK, this is what I did..
I removed my settings from my ~/.bashrc
I put the below settings in my /etc/profile at the bottom of the file. They are the same as yours except I have "export LANG" set to English, and my "export LC_CTYPE" is set to Chinese, and not that it matters, but I put my xft settings in aswell.

export LANG="en_US.UTF-8"
export LC_CTYPE="zh_CN.UTF-8"
export QT_XFT=true
export GDK_USE_XFT=1
export XMODIFIERS="@im=SCIM"
export GTK_IM_MODULE="scim-bridge"
export QT_IM_MODULE="scim-bridge"
export XIM_PROGRAM="scim -f x11 -c simple -d"
scim -f x11 -c simple -d

Then I rebooted my system and I first tested in kde3 by opening up abiword. ctrl + space worked fine, and left clicking opened up my various input engines. I tested aswell with a few qt apps. Everything worked like it should.

Then I rebooted again, but this time into fluxbox. without changing anything, I tested the same way with gtk and qt apps and everything worked as it did in kde3.

One thing I did notice was, right after reboot, when my desktop is empty with no apps running, scim is kind of like hibernating. ctrl + space and left clicking had no function. It only worked when a active window was open with a text field to type into, which is how it should be I guess. After that, I could close all apps and then crtl + space works, and left click showed all input options.

I'm sorry this doesn't really help you, other than to verify that your settings in your final post seems to work well for me. Maybe you just need to configure scim in it's setup gui?

Anyway thanks for helping me to get scim working globaly. Even if it always worked fine the way I had it. I just never had a reason to mess with it untill now.

I can't think of anything else, but now I'm curious. keep us posted on what you find out when you get it working ok?

Last edited by Leigh (2009-03-27 12:37:55)


-- archlinux 是一个极好的 linux

Offline

#12 2009-03-27 22:32:36

tiachopvutru
Member
Registered: 2009-03-25
Posts: 9

Re: Scim... howto?

The onlly I can open up scim is by going into gedit, right click, select Input Methods > SCIM. Plus, it only works on gedit, so if I were to type on something else, I would have to type in gedit first and then copy-and-paste it.

Such a solution is rather unsatisfactory, so I want it to work normally. I have been googling "scim left click doesn't work" or "scim ctrl space" but found no solution to my problem. It also seems that quite a few people have the same problem.

Offline

#13 2009-03-28 02:06:18

Leigh
Member
From: USA
Registered: 2004-06-25
Posts: 533

Re: Scim... howto?

Maybe if you kill scim and restart from a terminal to see if there are any errors? Goggling results are very overwhelming. So much info! I think I read about more problems related to gnome users vs other wm's / de's.

Is there a reason you havn't set export LANG="" variable?

Last edited by Leigh (2009-03-28 03:23:15)


-- archlinux 是一个极好的 linux

Offline

#14 2009-03-28 03:18:51

tiachopvutru
Member
Registered: 2009-03-25
Posts: 9

Re: Scim... howto?

Well, I didn't think it would help, so I didn't put it there. Anyhow, I have somehow gotten it to work now.

I will start with what I did after the last post. I edited the file ~/.scim/global and inserted these two lines:

/DefaultKeyboardLayout = US_Default
/SupportedUnicodeLocales = en_US.UTF-8

Well... it didn't work at first, but while I used my computer, I started to notice the SCIM symbol at the lower right of my corner, and somehow I ended up being able to use it.  I then closed it to see what was going on, and sure enough when I tried to Ctrl + Space or left click, it didn't work, either. After several trials, I found that the SCIM symbol will pop up if I wait for a long duration. I will close it and it would pop up. However, although I can type with scim in terminal or gedit, it wouldn't work in firefox.

After that, I read your post and thought it wouldn't hurt to try adding the LANG line.
Well, the result is pretty much the same, except that when I restart my computer the SCIM symbol would appear immediately or pretty soon. When I close it, the symbol reappears more quickly. In addition, I can now type with scim in firefox.

Anyway, that's how I have gotten it to work. I have no idea which parts help me and which parts don't. But I'm glad that it now works and enables me to type Japanese--I'm planning to learn the language. The only downsides are that it mess up my Notification Area a bit and I can't really disable it... The latter isn't a bother, though.

Offline

#15 2009-03-28 03:24:04

Leigh
Member
From: USA
Registered: 2004-06-25
Posts: 533

Re: Scim... howto?

I have a feeling this might be your problem. I noticed that your line...
export LC_CTYPE="en_US.utf8" The utf is lower-case and I think maybe it needs to be upper-case and is missing a "-"
Maybe it doesn't matter, but works on my system as...
export LC_CTYPE="en_US.UTF-8"

Anyway, once you get everything to work, I think you will like using scim-bridge with scim. When I started using scim I always had a hard time getting it to work with qt apps. It would work, but only if I had a gtk app open first. Then I could input into the qt app. After I changed to scim-bridge, everything works the same regardless if it's qt or gtk.

Last edited by Leigh (2009-03-28 04:03:30)


-- archlinux 是一个极好的 linux

Offline

Board footer

Powered by FluxBB