IBus GJS for GNOME-Shell 3.2.0

Sorry for the late response. I was a bit busy for gnome-shell and on vacation.
Fedora 16 will use gnome-shell 3.2.x and gjs 1.30.x.
Unfortunately We could not integrate ibus gjs into gnome-shell so we still need to install ibus-gnome3 by manual for gnome-shell.

There are two points to enable ibus-gnome3 with gnome-shell.

#1 Checking the versions
After you install ibus-gnome3 (yum install ibus-gnome3), you will notice /usr/share/gnome-shell/extensions/ibus-indicator@example.com/metadata.json is installed. That file provides the supported versions of gnome-shell and gjs.

# yum install gnome-shell gjs
# rpm -q gnome-shell gjs
gnome-shell-3.1.92-1.fc16.x86_64
gjs-1.29.18-1.fc16.x86_64
# yum install --enablerepo=updates-testing ibus ibus-gnome3
# rpm -q ibus-gnome3
ibus-gnome3-1.4.0-2.fc16.x86_64
# cat /usr/share/gnome-shell/extensions/ibus-indicator@example.com/metadata.json
{"shell-version": ["3.1.92"],
 "js-version": ["1.29.18"],
 "uuid": "ibus-indicator@example.com",
 "name": "Input-Method Status Indicator",
 "description": "Add a system status menu for input-methods using IBus",
 "url": "https://github.com/fujiwarat/ibus-gjs"
}

The example shows metadata.json file has the two keys ‘shell-version’ and ‘js-version’ and ‘shell-version’ is ‘3.1.92’ and ‘js-version’ is ‘1.29.18’.
The versions are matched with the versions of gnome-shell and gjs.
If the versions are different, ibus-gnome3 won’t be enabled with gnome-shell. [1]

#2 Enable dconf key
Unfortunately all shell extensions are disabled by default in GNOME 3.2 so you need to enable the dconf key by manual.

% gsettings get org.gnome.shell enabled-extensions 
[]
% gsettings set org.gnome.shell enabled-extensions "['ibus-indicator@example.com']"
% gsettings get org.gnome.shell enabled-extensions 
['ibus-indicator@example.com']

Now you can enable ibus-gnome3 with gnome-shell in Fedora 16. [2]

% gnome-shell --replace

If you cannot enable ibus-gnome3 but no errors on terminal, probably the follwing debug option might be useful for you

% env GJS_DEBUG_OUTPUT=stderr  gnome-shell --replace

Note: gnome-shell 3.2.0 and gjs 1.30.0 will be available soon and I also will update ibus-gnome3 with metadata.json file.

[1] Actually gnome-shell compares the versions with /usr/share/gnome-shell/js/misc/config.js and the checking script is versionCheck() in /usr/share/gnome-shell/js/ui/extensionSystem.js
[2] If you’d like to run gnome-shell by manual, compiz-gnome can shows the ‘Classic GNOME with Compiz’ on GDM login screen.

Advertisements

About fujiwara

I'm an open-sourced desktop i18n developer.
This entry was posted in IBus and tagged , , . Bookmark the permalink.

15 Responses to IBus GJS for GNOME-Shell 3.2.0

  1. Pingback: IBus GJS for GNOME-Shell 3.2.0 | DesktopI18N's Blog | Linux Blog

  2. Justin Wong says:

    It’s not working on GNOME 3.2 archlinux.

  3. Ruijin says:

    Seems it doesn’t works with ibus-1.4?
    I can make it work after comment out all the xkb related code. But that doesn’t looks good.
    I’m running ubuntu 11.10 and compile ibus 1.4 from google code.

    • fujiwara says:

      Fedora uses ibus 1.4 now.
      > But that doesn’t looks good.
      ? I don’t understand it.

      • Ruijin says:

        this._config.get_value(
        ‘general’,
        ‘system_keyboard_layout’,

        and
        this._config.get_value(
        ‘general’,
        ‘system_keyboard_option’,

        can’t get anything, and

        IBus.XKBConfigRegistry() doesn’t seems to be a class in ibus api.

        I comment out all related code and it work. But maybe I lose some xkb related functionality according to the code? I also install your ibus-xkb package but still can’t solve this problem.

    • fujiwara says:

      > this._config.get_value(
      > ‘general’,
      > ‘system_keyboard_layout’,
      > GLib.Variant.new_string(”)).get_boolean();

      I think this would return the GLib.Variant.new_string(”) if there is no ‘system_keyboard_layout’ key. I don’t enable ibus-dconf yet.
      The converting GLib.Variant had a problem but it’s fixed now.
      https://bugzilla.gnome.org/show_bug.cgi?id=622344
      https://bugzilla.gnome.org/show_bug.cgi?id=646635
      I’d expect the latest glib, gjs, and gobject-introspection are used for GNOME 3.2.

      > IBus.XKBConfigRegistry() doesn’t seems to be a class in ibus api.
      Sorry, I didn’t notice it. Now I fixed HAVE_IBUS_XKB:
      https://github.com/fujiwarat/ibus-gjs/commit/bfc41883ef280ce03deb205115e758e5a708e20d
      I think your HAVE_IBUS_XKB will be false.
      Yes, this part is not migrated into ibus-xkb yet. I will migrate it and update the HAVE_IBUS_XKB again.
      Thanks.

  4. WM says:

    fujiwaraさん、助けて~

    I’m running ubuntu 11.10 and compile ibus 1.4 from google code, too.
    Build options:
    Version 3.2.0.20111018
    Install prefix /usr/local
    Enable standalone yes
    IBus PKGDATADIR /usr/share/ibus
    IBus PREFIX /usr
    HAVE IBus XKB false
    IBUS XKB
    GNOME_SHELL_VERSION 3.2
    GJS_VERSION 1.29.18

    • fujiwara says:

      Hmm.., I guess you built ibus-gjs by yourself and the prefix is different between gnome-shell and ibus-gjs.
      I guess your js dir is /usr/share/gnome-shell/js which includes the sub directories of misc and ui.
      If you could read extensions/ibus-indicator@example.com/extension.js, it includes the line of “const Indicator = imports.ui.status.ibus.indicator;”.
      It means ibus-gjs needs to be installed $JS_DIR/ui/status/ibus .
      I guess your problem might be fixed when you run configure with –prefix=/usr
      % cd ibus-gjs
      % ./autogen.sh
      % ./configure –prefix=/usr

      > GNOME_SHELL_VERSION 3.2
      > GJS_VERSION 1.29.18

      Your gnome-shell’s version is 3.2.x and gjs’s version is 1.29.18.
      Probably I recommend to use gjs 1.30.x however if you upgrade gjs, you also will need to rebuild gnome-shell to use the latest gjs.

  5. WM says:


    Thanks for your help!
    But the candidate window didn’t follow my cursor.

    • fujiwara says:

      Hmm.., I wonder if your application uses ibus gtk client.
      How about setting GTK_IM_MODULE?
      % env GTK_IM_MODULE=ibus gedit

      I also expect to use GTK3 applications.
      % strace gedit |& grep ibus
      open(“/usr/lib64/gtk-3.0/3.0.0/immodules/im-ibus.so”, O_RDONLY|O_CLOEXEC) = 14

      • WM says:

        Thanks, I’ve add these lines to my .profile, and it works now.


        but I’ve checked my dconf and extensions folder.
        and I could not see the pre-edit string(「わたし」→私) in search and talk column of gnome shell. 残念Orz

      • WM says:

        # gtk application
        export GTK_IM_MODULE=ibus
        # kde application
        export QT_IM_MODULE=ibus
        # old X application
        export XMODIFIERS=”@im=ibus” xterm

    • fujiwara says:

      > I could not see the pre-edit string(「わたし」→私) in search and talk column of gnome shell. 残念Orz

      Yes, it’s a known issue. The search box in gnome-shell does not support preedit text and there is the my proposed fix:
      https://bugzilla.gnome.org/show_bug.cgi?id=658420
      Currently I added the workaround in ibus side in Fedora:
      https://github.com/fujiwarat/ibus/commit/06986a840ee5b65c54058602b0b84df833752daf

      But there is another problem in the search box, which is that Enter key is passed in gnome-shell:
      https://bugzilla.gnome.org/show_bug.cgi?id=658325

      I don’t know where is the talk column but maybe I think it’s the same problem.

      > http://i.imgur.com/s1hdO.png
      I don’t understand why such an error can be happened. You might hack gnome-shell itself or add custom shell extension files in $HOME.

      • WM says:

        Thanks, I found the another instance in /usr/local/share/gnome-shell.
        The Talk Column I meant is the Empathy integration on notification bar, yes, it is the same problem.

        And I think the Enter key problem in gnome shell search is so bad, 大嫌いOrz

        お助けいただいて本当に有難う~

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s