How to run IBUS input method on openSUSE 11.2?

I just heard about the newly developed input method IBUS (ibus - Project Hosting on Google Code) the other day. Supposedly, it fixes a number of problems of SCIM (which, unfortunately, is pretty much dead upstream), and both Ubuntu and Fedora are moving toward making IBUS the standard input on their systems.

Interestingly, there’s nothing on the openSUSE forums yet, so this thread is supposed to fill the void and become, eventually, a how-to guide for running IBUS on openSUSE 11.2.

I’ve tried to get IBUS running the past few days, but without succcess so far. Perhaps some of you how got it up and running already can help me out?

What I got so far:

REPOSITORIES:

According to webpin, all relevant files are available under:
Index of /repositories/home:/j-engel/openSUSE_11.2.

Another user recommended the m17n devel repository:
Index of /repositories/M17N:/Devel/openSUSE_11.2
This might fix some problems I’ve been having, but

The IBUS website also mentions the repository Index of /repositories/home:/swyear for openSUSE, but as far as I can see, the IBUS files don’t exist there anymore.

INSTALLATION:

So far, I’ve done the following:

(1) Complete uninstalled all SCIM/SKIM-related packages.

(2) Installed the following IBUS packages:

S | Name                         | Type    | Version            | Arch   | Repository            
--+------------------------------+---------+--------------------+--------+------------------------------
i | ibus                         | package | 1.1.0.20090612-1.7 | i586   | Extra_m17n (11.2 devel, ibus)
i | ibus-anthy                   | package | 1.1.0.20090603-1.2 | i586   | Extra_m17n (11.2 devel, ibus)
i | ibus-gtk                     | package | 1.1.0.20090612-1.7 | i586   | Extra_m17n (11.2 devel, ibus)
i | ibus-m17n                    | package | 1.1.0.20090211-1.1 | i586   | Extra_m17n (11.2 devel, ibus)
i | ibus-qt4                     | package | 1.1.0.20090612-1.7 | i586   | Extra_m17n (11.2 devel, ibus)
i | libibus0                     | package | 1.1.0.20090612-1.7 | i586   | Extra_m17n (11.2 devel, ibus)

(3) Tried the advice for running IBUS on the IBUS installation page (http://code.google.com/p/ibus/wiki/Install):

Started ibus-daemon (was running already, but I re-did it anyway):

 $ pkill -9 ibus
 $ ps -ef | grep ibus
 $ /usr/bin/ibus-daemon --xim &

Set the environmental variables:


$ GTK_IM_MODULE=ibus 
$ QT_IM_MODULE=ibus
$ XMODIFIERS="@im=ibus"

Then I tried to run ibus-setup, but I get stuck with an error message:

~> ibus-setup
Traceback (most recent call last):
  File "/usr/share/ibus/setup/main.py", line 28, in <module>
    import gtk
ImportError: No module named gtk

(This one I don’t understand. I DID install the ibus-gtk package, so what is it complaining about?!)

(4) I’ve also tried to open the IBUS Preferences dialog from KRunner, but that one doesn’t work either.

What are my next steps? What did I do wrong?

maybe you need the devel package??

I found out something tonight that may help you. I have two computers, both have openSUSE 11.2 (w/ KDE4 from default repo) and both have ibus with Japanese input.

On Computer A, I was trying to type Japanese in kwrite but I wasn’t able to. In fact, I wasn’t able to type Japanese in any QT apps but it did work in all GTK apps.

On Computer B, I was able to type Japanese in any apps.

I found out what was different on the two computers… it was:

export GTK_IM_MODULE=ibus 
export QT_IM_MODULE=ibus
export XMODIFIERS=@im=ibus

I removed the above lines from my .bashrc file on Computer A and rebooted. I was then able to type Japanese in any apps.

gogalthorp,

I’ve added the relevant devel packages, I still get the error message when I try to open ibus-setup.

londy,

interesting. I took a look at my .bashrc file, but there’s nothing in it (except one line irrelevant to the input method). I wonder which file contains the default settings for the environmental variables you mentioned by default?

Interestingly, if I don’t change the variables by hand, they look the following way after installing ibus & rebooting:

~> echo $GTK_IM_MODULE
ibus
~> echo $QT_IM_MODULE
xim
~> echo $XMODIFIERS
@im=ibus

So, only the QT-relevant variable is apparently not set automatically.

Anyway, the main problem seems to me that I can’t open the setup/preferences dialog, so I’ll probably have to work on that. Are you able to get the dialog if you type ‘ibus-setup’ in console?

… hmmm, does this mean that I have to compile everything from scratch? :frowning:

I misunderstood your problem. I get it now, you can’t even get the preferences dialog to show up and I assume no ibus in your system tray.

When I run ibus-setup, the preferences dialog pops up. No problems for me.

Did you remove everything from the j-engel repo and what command did you run to install ibus?

I’m only using Japanese with it, but I don’t have that “ibus-m17n” package installed.

Oh, I was wondering about the system tray … I figured there should be something, but I got no ibus icon or anything in there …

It’s strange, I removed all SKIM files and all ibus files from jengels, so theoretically there should be nothing interfering with the ibus package from the m17n devel repo. I installed them a couple of times in different ways (directly through yast2 / using zypper in ibus ibus-anthy, as you mentioned), but it always comes out to the same thing.

Interestingly, it also doesn’t seem to make any difference whether I use the packages from jengels or from m17n, since I end up with the same error message (and nothing in my sys tray).

londy, how did you start with ibus? I assume you first had SCIM on your system, but erased it then and installed ibus through the command you told me earlier?

I wonder: Is there anyone else out there who installed ibus on a fresh openSUSE 11.2 installation?

londy, how did you start with ibus? I assume you first had SCIM on your system, but erased it then and installed ibus through the command you told me earlier?

No, I installed ibus on the very first day that I installed opensuse 11.2 for both my computers. I never installed scim or uim on opensuse.

Your error “ImportError: No module named gtk” seems to be related to python-gtk. Do you have it installed? Try re-installing it.

Here are my other gtk related packages I have installed. Maybe you’re missing something. I’m pretty sure these all came installed by default other than the ibus one.

i | gtk2                    | Library for Creation of Graphical User Interfaces-> | package
i | gtk2-branding-openSUSE  | openSUSE theme configuration                        | package
i | gtk2-engine-murrine     | Murrine GTK Theme Engine                            | package
i | gtk2-engines            | Engines for GTK2 Themes                             | package
i | gtk2-metatheme-gilouche | openSUSE themes and metathemes for gtk2 and metac-> | package
i | gtk2-metatheme-sonar    | GTK+ and Metacity Sonar Theme                       | package
i | ibus-gtk                | IBus im module for gtk2                             | package
i | kcm_gtk                 | KDE control module for switching GTK+ style         | package
i | python-gtk              | Python bindings for the GTK+ widget set             | package
i | qtcurve-gtk2            | QtCurve style for Gtk2                              | package

londy,

fantastic, python-gtk was the culprit. Actually it was missing from my installation, and after I installed it everything is working fine now (Japanese, Chinese, Hindi).

If you have a second, could you check one thing for me?
If you installed the ibus-m17n package, there should be several input methods under “Other”, including one called “latin-pre” (latn-pre, I think it is actually). It used to input non-ascii latin characters like German umlauts and French accents; e.g. "+a should give you the German a-umlaut.

Could you check whether it’s working for you? For me, it actually isn’t (e.g. when inputing the above, I get two characters, one quotation mark and a separate a), and since it’s a very convenient input method, I’d like to figure out why.

Cheers

Nope, I just tried and it doesn’t work for me but I have no experience typing anything other than Japanese and English.

Thanks for the info! :slight_smile:

I have also some problems to get ibus running.

I’ve installed ibus from jengels repository but the systemtray icon was missing.
After installing python-notify I got finally the icon and by pressing CTRL + SPACE the icon changes to the “Anthy crown” but I still type the latin alphabet without changing to hiragana like I was used to in skim…

Any ideas?

Philo007,

Your ibus installation sounds fine since you got the system tray icon and Anthy running.

I wonder whether you got the necessary Japanese fonts etc. installed. A good idea might be to open Yast2, then go to System > Language, and activate “Japanese” under Secondary Languages.

Also, if you activate Anthy, does the Japanese input bar show up somewhere on the desktop? Perhaps the input mode there is still on “Latin”; make sure it is switched to “Hiragana” (click on the “capital letter A” in the language bar; if set correctly, it should show a hiragana “a”).

Does this help?

Done, but no improvements.

Also, if you activate Anthy, does the Japanese input bar show up somewhere on the desktop? Perhaps the input mode there is still on “Latin”; make sure it is switched to “Hiragana” (click on the “capital letter A” in the language bar; if set correctly, it should show a hiragana “a”).

There is no “Japanese input bar” on the desktop. I am not really sure what do you mean…

If I switch to “(hiragana a) - anthy” I can type some japanese letters, but hajimemashite looks like “っhajiっめえっmasっhitええ”

I thought if I am using Anthy (crown) I would write in hiragana and by pressing space there would pop up this kanji-menu like in skim…but only latin letters are displayed…

Finally I’ve got this “japanese input bar” on my second Pc. :slight_smile: I still have to check why I do not get this on the other computer…

I’ve also started ibus in verbose mode again & installed the missing libmimx-anthy.so.
But I’m still not able to enter hiragana :frowning:

I get a lot of outputs like this:

(ibus-daemon:6704): IBUS-WARNING **: org.freedesktop.DBus.Python.TypeError: Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/dbus/service.py", line 702, in _message_cb                           
    retval = candidate_method(self, *args, **keywords)                                                        
  File "/usr/lib/python2.6/site-packages/ibus/engine.py", line 154, in ProcessKeyEvent                        
    return self.__engine.process_key_event(keyval, keycode, state)                                            
TypeError: process_key_event() takes exactly 3 arguments (4 given)

Edit:
The missing panel output:

/usr/lib/python2.6/site-packages/dbus/connection.py:242: DeprecationWarning: object.__init__() takes no parameters
  super(Connection, self).__init__(*args, **kwargs)
/usr/lib/python2.6/site-packages/dbus/connection.py:242: DeprecationWarning: object.__init__() takes no parameters
  super(Connection, self).__init__(*args, **kwargs)
(ibus-daemon:8996): IBUS-DEBUG: From ::1.7 to :1.10, Error: org.freedesktop.DBus.Error.Failed : Can not get value [panel->position]

I’ve reported these problems:
Issue 766 - ibus - panel missing - Project Hosting on Google Code
Issue 767 - ibus - anthy does not change latin letters to kana or kanji - Project Hosting on Google Code

Yes I couldn’t find them a few days ago but they are there :wink:

Index of /repositories/home:/swyear:/ibus/openSUSE_11.2

I’ll try that repository when I am back home…

Works now like a charm!! lol!
Changed the repository and replaced ibus-anthy with the newer one.

On one computer I still don’t have the panel but I think I don’t need it.

Is there a way to contact the maintainer Johannes Engel of the other repository and to tell him to update ibus-anthy?

Philo007,

thanks for the updates and additional info on ibus.

For having ibus updated, it’s probably best to file a bug report:
Submitting Bug Reports - openSUSE

Cheers,

homoludens