Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Still can't get ibus to work with QT4 applications. [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
Budoka
Guru
Guru


Joined: 03 Jun 2012
Posts: 330
Location: Tokyo, Japan

PostPosted: Mon Apr 15, 2013 2:09 am    Post subject: Still can't get ibus to work with QT4 applications. [SOLVED] Reply with quote

In the past I would use this http://9oe.me/blog/?p=1170 to get the Japanese input to work with Skype. I even re-posted the link on a thread for someone else having the same difficulty. But for some odd reason it is just not working this time. Any ideas how I can fix this. Japanese input is a hard requirement for my box.

http://bpaste.net/show/91390/


Last edited by Budoka on Mon Sep 16, 2013 5:09 am; edited 1 time in total
Back to top
View user's profile Send private message
dufeu
l33t
l33t


Joined: 30 Aug 2002
Posts: 737
Location: US-FL-EST

PostPosted: Thu May 30, 2013 11:17 pm    Post subject: Reply with quote

Since I expect to eventually be interested in 'ibus' etc, I tried a few things.

The first thing I looked at was adding this fragment to my /etc/portage/make.conf:
Code:
# IBus - additional alternative input method for input of Chinese Japanese Koran text
#   It is possible you may want to additionally "emerge -1 ibus-anthy" plus some other
#   ibus related packages. Note to self - Need more knowlege about this.
USE="${USE} ibus"

I also went to the IBus - Intelligent Input Bus for Linux / Unix OS site to glean what info I could. One of the items of note was the inclusion of 'vala' in order to improve the performance of IBus. I already know that some projects are having problems with 'vala' support so rather than add the 'vala' USE flag to my make.conf USE section, I added 'vala' USE specifically for 'ibus':
Code:
# echo ">=app-i18n/ibus-1.5.2 vala" >> /etc/portage/package.use/package.use

I executed:
Code:
# emerge -puNDv @world
to see what packages might be affected. The only packages which came up were:
Code:
[ebuild  N     ] app-i18n/ibus-1.5.2  USE="X gconf gtk gtk3 introspection nls python vala -dconf -deprecated {-test}" PYTHON_SINGLE_TARGET="python2_7 -python2_5 -python2_6" PYTHON_TARGETS="python2_7 -python2_5 -python2_6" 1,839 kB
[ebuild   R    ] kde-base/kdeplasma-addons-4.10.3:4  USE="exif ibus* scim semantic-desktop (-aqua) -attica -debug -desktopglobe -fcitx -json -oauth -qalculate -qwt" 0 kB

Total: 2 packages (1 new, 1 reinstall), Size of downloads: 1,839 kB

Vala didn't come up because I already have it as a dependency for several other installed packages.

I also wanted to see what would come up with 'skype' so I did:
Code:
# emerge -puNDV skype
Once again, two packages came up. These were:
Code:
[ebuild  N     ] app-emulation/emul-linux-x86-qtlibs-20130224  USE="development -gtkstyle" 17,976 kB
[ebuild  N     ] net-im/skype-4.2.0.11  USE="-pax_kernel (-selinux)" 15,733 kB

Total: 2 packages (2 new), Size of downloads: 33,708 kB

What I see here is that 'skype' has no direct dependency for any input method. Whatever input is passed through the windows manager {and ultimately X} is what skype accepts. This is the behaviour/design I would expect.

I emerged all 4 packages. The messages of interest are the ones from the 'ibus' package:
Code:
 * Messages for package app-i18n/ibus-1.5.2:

 * To use ibus, you should:
 * 1. Get input engines from sunrise overlay.
 *    Run "emerge -s ibus-" in your favorite terminal
 *    for a list of packages we already have.
 *
 * 2. Setup ibus:
 *
 *    $ ibus-setup
 *
 * 3. Set the following in your user startup scripts
 *    such as .xinitrc, .xsession or .xprofile:
 *
 *    export XMODIFIERS="@im=ibus"
 *    export GTK_IM_MODULE="ibus"
 *    export QT_IM_MODULE="xim"
 *    ibus-daemon -d -x

In order of the instructions:
  1. You probably want at least either
    Code:
    *  app-i18n/ibus-anthy
          Latest version available: 1.5.0
          Latest version installed: [ Not Installed ]
          Size of files: 565 kB
          Homepage:      http://code.google.com/p/ibus/
          Description:   Japanese input method Anthy IMEngine for IBus Framework
          License:       GPL-2

    *  app-i18n/ibus-skk
          Latest version available: 1.4.1
          Latest version installed: [ Not Installed ]
          Size of files: 466 kB
          Homepage:      http://github.com/ueno/ibus-skk
          Description:   Japanese input method Anthy IMEngine for IBus Framework
          License:       GPL-2
    I haven't a clue as to which may be better or more appropriate. I'm completely over my head here. On the other hand, you already have experience with this stuff so perhaps you can do a little experimenting. ;)

  2. Obviously, you want to run the 'ibus-setup' program. I tried it and mine failed. Apparently, ibus-setup requires 'gtk':
    Code:
    # ibus-setup

    ** (main.py:31156): WARNING **: Could not open X display
    Traceback (most recent call last):
      File "/usr/share/ibus/setup/main.py", line 29, in <module>
        from gi.repository import Gtk
      File "/usr/lib64/python2.7/site-packages/gi/importer.py", line 76, in load_module
        dynamic_module._load()
      File "/usr/lib64/python2.7/site-packages/gi/module.py", line 244, in _load
        overrides_modules = __import__('gi.overrides', fromlist=[self._namespace])
      File "/usr/lib64/python2.7/site-packages/gi/overrides/Gtk.py", line 1624, in <module>
        raise RuntimeError("Gtk couldn't be initialized")
    RuntimeError: Gtk couldn't be initialized

    This is almost sure to be a USE flag issue but I don't understand why since I have both 'gtk' and 'gtk3' USE flags set for 'ibus':
    Code:
    Installed versions:  1.5.2^t{tbz2}(05:42:33 AM 05/30/2013)(X gconf gtk gtk3 introspection nls python vala -dconf -deprecated -test PYTHON_SINGLE_TARGET="python2_7 -python2_5 -python2_6" PYTHON_TARGETS="python2_7 -python2_5 -python2_6")
    I'll have to experiment some more.

  3. I usually invoke my windows managers from CLI. i.e.
    Code:
    # XSESSION=kde-4 startx -- :0
    so I haven't checked to see where the best place for me to add the variable value exports and the ibus-daemon would make the most sense for me.

    Note that the 'ibus-daemon' is expected to be started by X and not from within /etc/init.d/ {rc-update}.

All of the above suggests that configuring 'ibus' occurs before any windows manager starts and that 'ibus' is expected to integrate with X. This would imply that 'ibus' functionality should be available to all GUI based packages such as Skype. That is to say - you're not having a QT4 configuration problem, your having a problem getting 'ibus' properly integrated with X.
_________________
People whom think M$ is mediocre, don't know the half of it.
Back to top
View user's profile Send private message
Budoka
Guru
Guru


Joined: 03 Jun 2012
Posts: 330
Location: Tokyo, Japan

PostPosted: Mon Sep 16, 2013 5:07 am    Post subject: Reply with quote

I was never able to resolve this problem but upon doing a world update and upgrading to kernel 3.10.7 the problem resolved itself. I am not sure which fixed it but all good now.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum