LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Japanese input with scim-anthy (https://www.linuxquestions.org/questions/slackware-14/japanese-input-with-scim-anthy-843796/)

mattca 11-11-2010 09:16 PM

Japanese input with scim-anthy
 
Hi all I can't seem to get Japanese input working with scim-anthy. I have scim 1.4.9 installed and the daemon running. I have the scim-anthy 1.3.1 package installed as well. I can open and modify the scim-settings, but I can't get the anthy dialog to appear. Apparently, ctrl-space should bring up the dialog, but nothing happens. I tried following the instructions on this page under "Open a program with japanese input enabled - via command line", but still no dialog.

After starting the daemon, I tried:

Code:

XMODIFIERS='@im=SCIM' LC_CTYPE=en_US.UTF-8 gvim
And no luck. Note that I don't really understand what that command is supposed to do. Should it be something different? Help!

Bruce Hill 11-11-2010 11:34 PM

What version of Slackware are you using?

Also, issue "dmesg | grep scim" and post anything that it outputs.

Follow the instructions from CHANGES_AND_HINTS.TXT that came with Slackware:
Quote:

Input methods for complex characters (CJK, which is shorthand for Chinese,
Japanese, Korean) and other non-latin character sets have been added. These
input methods use the SCIM (Smart Common Input Method) platform.
The environment variables for SCIM support are set in /etc/profile.d/scim.sh
The requirements for getting SCIM input methods to work in your X session
are as follows:
(1) Use a UTF-8 locale. Look in /etc/profile.d/lang.sh for setting your
language to (for instance) en_US.UTF-8. As a word of warning: maybe you
should leave root with a non-UTF-8 locale because you don't want root's
commands to be misinterpreted. You can add the following line to your
~/.profile file to enable UTF-8 just for yourself:
export LANG=en_US.UTF-8
(2) Make the scim profile scripts executable. These will setup your
environment correctly for the use of scim with X applications. Run:
chmod +x /etc/profile.d/scim.*
(3) Start the scim daemon as soon as your X session starts. The scim daemon
must be active before any of your X applications. In KDE, you can add a
shell script to the ~/.kde/Autostart folder that runs the command
"scim -d". In XFCE you can add "scim -d" to the Autostarted Applications.
If you boot your computer in runlevel 4 (the graphical XDM/KDM login)
you can simply add the line "scim -d" to your ~/.xprofile file.
This gives you a Desktop Environment independent way of starting scim.
When scim is running, you will see a small keyboard icon in your system tray.
Right-click it to enter SCIM Setup. In 'Global Setup' select your keyboard
layout, and you are ready to start entering just about any language
characters you wish! Press the magical key combo <Control><Space>
in order to activate or deactivate SCIM input. The SCIM taskbar in the
desktop's corner allows you to select a language. As you type, SCIM will show
an overview of applicable character glyphs (if you are inputting complex
characters like Japanese).
After starting SCIM with the above method, you will have an icon for SCIM.
Right-click on it and choose SCIM Setup. Then under IMEngine click on
Global Setup and then in the window on the right remove all the input methods
that you don't need. For me it's easiest just to select Disable All and then
go and manually check the input methods I need.

After that you will have to restart the SCIM service. Should be as easy as
clicking Exit on the SCIM icon, but in Slackware that doesn't work. To be sure
it's restarted properly you should close the X server, KDE or whatever one you
use, and then restart it. After that you should be able to open an app and then
press Ctrl + Space to start SCIM input.

If you follow these instructions and have problems, please post back.

If you are using Slackware Linux, instructions for another distro might not work.

BILLYKANE 11-12-2010 12:12 AM

Try like this:

Code:

export XMODIFIERS="@im=SCIM"
export LANG=zh_CN.UTF-8
LC_CTYPE=zh_CN.UTF-8
scim -d
gvim

and change zh_CN locale to japanese cause I don't know what the japanese locale is called.

mattca 11-12-2010 12:17 AM

Quote:

Originally Posted by Bruce Hill (Post 4156451)
What version of Slackware are you using?

Sorry, 13.0

Quote:

Also, issue "dmesg | grep scim" and post anything that it outputs.
Nothing:

Code:

        [matt@hopper] $ dmesg | grep scim
        [Fri Nov 12, 01:17:04] [~]
        [matt@hopper] $

Quote:

Follow the instructions from CHANGES_AND_HINTS.TXT that came with Slackware:
...
After starting SCIM with the above method, you will have an icon for SCIM.
Right-click on it and choose SCIM Setup. Then under IMEngine click on
Global Setup and then in the window on the right remove all the input methods
that you don't need. For me it's easiest just to select Disable All and then
go and manually check the input methods I need.

After that you will have to restart the SCIM service. Should be as easy as
clicking Exit on the SCIM icon, but in Slackware that doesn't work. To be sure
it's restarted properly you should close the X server, KDE or whatever one you
use, and then restart it. After that you should be able to open an app and then
press Ctrl + Space to start SCIM input.
I don't have a desktop or taskbar, I run everything from the command line. I was able to find the settings and adjusted them as you said, but still nothing.

I'm not sure that I'm doing this right. Should I be able to open, say, Firefox or OpenOffice, hit ctrl-space, and then some dialog box should pop up? When I do this, nothing happens :(

mattca 11-12-2010 12:21 AM

Also, I don't know if this is relevant or not, but when I start scim without specifying a front end, it starts fine:

Code:

        [Fri Nov 12, 01:22:59] [~]
        [matt@hopper] $ scim -d       
Smart Common Input Method 1.4.9

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 ...
GTK Panel of SCIM 1.4.9

Starting SCIM as daemon ...
SCIM has been successfully launched.

But when I specify anthy as the front end it fails:

Code:

        [Fri Nov 12, 01:21:56] [~]
        [matt@hopper] $ scim -f anthy -d
Smart Common Input Method 1.4.9

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 anthy...
Loading socket Config module ...
Creating backend ...
Loading anthy FrontEnd module ...
Failed to load anthy FrontEnd module.
Failed to launch SCIM.


mattca 11-12-2010 12:28 AM

Quote:

Originally Posted by BILLYKANE (Post 4156474)
Try like this:

Code:

export XMODIFIERS="@im=SCIM"
export LANG=zh_CN.UTF-8
LC_CTYPE=zh_CN.UTF-8
scim -d
gvim

and change zh_CN locale to japanese cause I don't know what the japanese locale is called.

Thanks, that did something. Now my gvim menus are in Japanese.. but still nothing happens when I hit ctrl-shift.

Note that I don't want everything to be in Japanese, I just want to be able to enter Japanese text. I am learning the language and need to be able to search for things and communicate with people, but don't want my whole environment to be changed.

linuxs64 11-12-2010 01:39 AM

Did you try ibus from sbopkg?

BILLYKANE 11-12-2010 07:11 AM

Hi mattca,how did you get scim-anthy 1.3.1 package?
Even in slackware-current, scim-anthy version is only 1.2.4,I was wondering whether there is a confict.Also, did you got anthy package installed?'


Below is what I did, it do work even in my chinese envionment.

Code:

slackpkg install anthy
cause my slackware version is current, so I got these two package installed,and in your slackware,it may be different version:

Code:

anthy-9100h-i486-1.txz
scim-anthy-1.2.4-i486-2.txz

then run
Code:

scim -d
instead of
Code:

scim -f anthy -d
then Right-click on scim icon and choose SCIM Setup and choose anthy option and restart scim.

mattca 11-12-2010 07:49 PM

Quote:

Originally Posted by BILLYKANE (Post 4156709)
Hi mattca,how did you get scim-anthy 1.3.1 package?

I installed it from source:

http://sourceforge.jp/projects/scim-imengine/

Quote:

Even in slackware-current, scim-anthy version is only 1.2.4,I was wondering whether there is a confict.Also, did you got anthy package installed?'
I don't think there is a conflict.. the README for scim-anthy 1.3.1 says this:

Code:

2. Requirements
===============

2.1 Necessary

  * scim-1.2.0 or later.
    - http://www.scim-im.org/

  * Anthy-7500 or later.
    - http://anthy.sourceforge.jp/
    - http://sourceforge.jp/projects/anthy/

And yes, anthy is installed.

I might not have done it in the right order though, if a certain order is necessary.

Maybe I'll remove everything and reinstall.

Quote:

Below is what I did, it do work even in my chinese envionment.

Code:

slackpkg install anthy
cause my slackware version is current, so I got these two package installed,and in your slackware,it may be different version:

Code:

anthy-9100h-i486-1.txz
scim-anthy-1.2.4-i486-2.txz


I usually install from source...

I have
Code:

anthy-9026.tar.gz
scim-anthy-1.3.1.tar.gz

and scim 1.4.9 was already installed on my system.

Quote:

then run
Code:

scim -d
instead of
Code:

scim -f anthy -d
then Right-click on scim icon and choose SCIM Setup and choose anthy option and restart scim.
I don't have icons. But, when I run scim-setup I see the GUI options panel. Under "IMEngine" there is a section for anthy, but this contains options for configuring anthy, NOT for selecting anthy as the input engine. I can't find an option anywhere that allows me to "choose anthy". Which option do you mean?

Also, I'm not sure that I'm using it right. Just so that I understand, once it is set up properly, and the scim daemon is running the background, I should be able to open an application - say, Firefox, Open Office, gvim - hit Ctrl-Space, and then a dialog box should pop up allowing me to input Japanese characters.

Is that correct?

Thanks.

mattca 11-12-2010 07:50 PM

Quote:

Originally Posted by linuxs64 (Post 4156519)
Did you try ibus from sbopkg?

I didn't since I saw that scim was already installed. Maybe I'll give ibus-anthy a try.

Bruce Hill 11-12-2010 08:02 PM

SCIM is no longer being maintained. The developers work for RedHat,
and they have been pulled off of SCIM. They are now maintaining iBus,
so it would be good to build your own iBus packages for Slackware.

SCIM is also not properly patched in Slackware, so that gives you
another incentive. iBus is working fine for me.

BILLYKANE 11-12-2010 08:24 PM

Quote:

I don't have icons. But, when I run scim-setup I see the GUI options panel. Under "IMEngine" there is a section for anthy, but this contains options for configuring anthy, NOT for selecting anthy as the input engine. I can't find an option anywhere that allows me to "choose anthy". Which option do you mean?
YES, run scim-setup.And click IMEngines--Global setup.In this section you will see all language option in th right and please choose the Japanese option.here is to choose input method for japanese such as anthy, Nippon and so on,not the IMEngine--Anthy section.

Then restart scim -d ......

Maybe all you problem is due to this......

Bruce Hill 11-12-2010 08:57 PM

Quote:

Originally Posted by mattca (Post 4157273)

But do install the Slackware packages from here

mattca 11-14-2010 11:50 PM

Thanks for the help everyone, but I ended up getting JWPce working through WINE. I don't know what the issue was with scim, and ibus requires GConf and I avoid anything Gnome-related like the plague, so that wasn't a good option for me. JWPce is good enough for my purposes.. I can copy and paste it wherever I need it.

Also, I know where to get Slackware packages.. I just prefer to install from source. Actually, my wine install was a good example of why. The slackbuild wouldn't work on my system - it complained about an unimplemented function. I installed from source, and it worked fine on the first go. I only use packages if source is not an option, which doesn't happen very often. I think OpenOffice is the only thing I have consistently used the slackbuild for.

Bruce Hill 11-15-2010 01:30 AM

mattca,

If you are comfortable building from source, that is splendid.
However, in order to better manage packages on your system, it
is my suggestion to build and install them with SlackBuild scripts.

If you're not familiar with that, a good starting place would be the
the tool called Alien's SlackBuild Toolkit that Eric Hameleers wrote
just specifically for this purpose.

Glad you got Japanese input working on your computer.


All times are GMT -5. The time now is 10:46 AM.