Bug 8731 - Inputing Chinese fine with text editor, but not with firefox.
Summary: Inputing Chinese fine with text editor, but not with firefox.
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: High major
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard: MGA5TOO
Keywords: NEEDINFO
: 12509 (view as bug list)
Depends on:
Blocks: 11709
  Show dependency treegraph
 
Reported: 2013-01-18 04:33 CET by paul lee
Modified: 2016-05-01 10:05 CEST (History)
13 users (show)

See Also:
Source RPM: ibus, gtk+2.0
CVE:
Status comment:


Attachments
using multiple app and input Chinese (193.33 KB, image/png)
2016-03-10 11:12 CET, You-Cheng Hsieh
Details
how to print info we need (34.85 KB, image/png)
2016-03-10 11:21 CET, You-Cheng Hsieh
Details

Description paul lee 2013-01-18 04:33:12 CET
Description of problem:

I don't know if it's a bug or a mis adjustment by user.

please identify for me .

Thanks.
Comment 1 paul lee 2013-01-18 04:36:21 CET
I setup Chinese input by ibus-setup command and it works fine with text editors inputing Chinese letters, but won't work with firefox.
Manuel Hiebel 2013-01-18 21:49:05 CET

CC: (none) => fundawang

Comment 2 You-Cheng Hsieh 2013-02-05 10:23:15 CET
Have you installed ibus-gtk or ibus-gtk3? Please try install both of them and see if that helps.

CC: (none) => yochenhsieh

Comment 3 You-Cheng Hsieh 2013-02-26 08:18:10 CET
Hello, does that help? 

Could you install ibus-gtk and ibus-gtk3, then try again?
Comment 4 paul lee 2013-02-27 10:39:53 CET
(In reply to You-Cheng Hsieh from comment #3)
> Hello, does that help? 
> 
> Could you install ibus-gtk and ibus-gtk3, then try again?

Thanks for your help/info.

I can't find ibus-gtk but the ibus-gtk3 is there installed, how to find and install ibus-gtk?

However fyi, ibus-setup works well with the system preinstalled browser - web 3.4.1, which is now i am using tying 中æã

could this mean firefox needs special configuration?
Comment 5 You-Cheng Hsieh 2013-02-27 11:32:18 CET
If you are not familiar with software management, please read the documentation here:
https://wiki.mageia.org/en/Software_management

If you have "core release" checked in "Configure media sources for install and update", you should be able to search and install ibus-gtk. The GUI might need some time to get used to, though.

Or you can try run following command as root:
urpmi ibus-gtk
Comment 6 paul lee 2013-02-28 06:58:05 CET
(In reply to You-Cheng Hsieh from comment #5)
> If you are not familiar with software management, please read the
> documentation here:
> https://wiki.mageia.org/en/Software_management
> 
> If you have "core release" checked in "Configure media sources for install
> and update", you should be able to search and install ibus-gtk. The GUI
> might need some time to get used to, though.
> 
> Or you can try run following command as root:
> urpmi ibus-gtk

Thanks You-Cheng Hsieh, but it seems same: I have "core updates" checked but still cannot find ibus-gtk; I also tried "urpmi ibus-gtk",but it reflects with "command not found"

Mine is mageia gnome 3.4.1
Comment 7 You-Cheng Hsieh 2013-02-28 12:59:24 CET
Only core updates? No "core release"?

Please follow the documentation and add full set of sources:
https://wiki.mageia.org/en/Software_management#You_prefer_to_configure_the_official_media_sources

Make sure you have "Core release", otherwise you cannot install ibus-gtk.

To install packages from commandline, you need to be root:
su root
(enter root password)
urpmi ibus-gtk
Comment 8 paul lee 2013-03-01 03:01:29 CET
Thanks You-Cheng Hsieh, I don't have the "core release" option. All I have 3 options under Configure media:

FTP Core Updates (distrib1)
FTP Nonfree Updates (distrib2)
FTP Tainted Updates (distrib3)

All checked.

I got root this time and urpmi ibus-gtk command works, but it says: No package named ibus-gtk
Comment 9 You-Cheng Hsieh 2013-03-01 04:47:13 CET
Please add a full set of package source first. As I've said earlier, you cannot install ibus-gtk if you don't have core release.

If you don't know how to use control center, you can try the command below:
su root
(enter root password)
urpmi.addmedia --distrib --mirrorlist '$MIRRORLIST'
urpmi ibus-gtk
Comment 10 Jin-tong Hu 2013-08-11 11:21:05 CEST
I'm currently using Mageia Cauldron and have the same problem. Inputting Chinese with ibus in Dolphin, Konquorer and KWrite are all OK, but not in Firefox and PCManX. Trying using scim instead doesn't work, either.

CC: (none) => piscestong
Version: 2 => Cauldron

Comment 11 You-Cheng Hsieh 2013-08-13 08:26:35 CEST
I can use ibus with gtk3 apps in Gnome, but gtk2 apps (PCManx, firefox, etc.) don't work.
You-Cheng Hsieh 2013-11-18 02:20:18 CET

Priority: Normal => High
Hardware: i586 => All
Severity: normal => major

Anne Nicolas 2013-11-19 22:03:27 CET

Blocks: (none) => 11709

Olav Vitters 2013-11-20 00:08:00 CET

CC: (none) => olav

Comment 12 Thierry Vignaud 2013-11-20 22:21:34 CET
(In reply to You-Cheng Hsieh from comment #11)
> I can use ibus with gtk3 apps in Gnome, but gtk2 apps (PCManx, firefox,
> etc.) don't work.

And you do have ibus-gtk installed?

CC: (none) => thierry.vignaud

Comment 13 You-Cheng Hsieh 2013-11-21 02:14:19 CET
Yes. I know how to add media and install package. 
DE is not the problem cause, it happens to me in LXde, KDE, Gnome, xfce.

You can use any mga4 beta 1 live DVD and try it. The packages are all installed but ibus only not work in firefox and gtk2 app.
Richard Patrick 2014-02-02 18:54:24 CET

CC: (none) => rjpatrick19

Comment 14 Ethan Merritt 2014-02-04 18:12:56 CET
Having just upgraded from Mageia 3 to Mageia 4, I am now seeing what I assume is the same problem.  The google chrome browser no longer recognizes the presence of keyboard input methods other than "simple" and "none", whereas before it listed a long menu of options including xim, scim, uim, and so on.

Installing ibus-gtk does not change this in any way I can detect.

Keyboard input to other applications using ibus + Anthy continues to work fine.

CC: (none) => eamerritt

Comment 15 Jin-tong Hu 2014-02-04 19:12:33 CET
Yep. The problem still remains.
Comment 16 Pavel Kreuzt 2014-02-21 05:29:16 CET
Seems the same problem described here:

https://wiki.archlinux.org/index.php/IBus#GTK.2B_applications

In Mageia's case the export line is:

export GTK_IM_MODULE_FILE=/etc/gtk-2.0/gtk.immodules.lib64 (for 64bit apps) or

export GTK_IM_MODULE_FILE=/etc/gtk-2.0/gtk.immodules.lib (for 32bit ones)

Now the problem is how to integrate GTK2 and GTK3 apps at the same time, since every one needs different settings. And, on top of that, the difference between 64bit and 32bit.

CC: (none) => pkreuzt

Comment 17 Ethan Merritt 2014-02-21 06:01:17 CET
Excellent!

So for me the fix is to add these lines to the bash wrapper that comes with the chrome browser:
   /opt/google/chrome/google-chrome

# scim/uim/ibus input requires help from GTK2
export GTK_IM_MODULE_FILE=/etc/gtk-2.0/gtk.immodules.lib64

I confirm that this solves the problem on 64bit Mageia 4 (and Cauldron).
Comment 18 You-Cheng Hsieh 2014-02-21 09:43:42 CET
Confirm works on  Mageia4 i586. Will add the workaround on wiki errata. Thanks Pavel!
Comment 19 Jin-tong Hu 2014-02-22 08:12:37 CET
Works here, too. But I can no longer open the ibus preference window.
Comment 20 Ethan Merritt 2014-02-28 00:40:41 CET
*** Bug 12509 has been marked as a duplicate of this bug. ***
Comment 21 Jin-tong Hu 2014-03-05 22:36:02 CET
With the line

export GTK_IM_MODULE_FILE=/etc/gtk-2.0/gtk.immodules.lib

added in my ~/.bashrc file, gtk-2 apps will not start but segfault in the latest Cauldron.
Comment 22 Jin-tong Hu 2014-03-06 21:02:09 CET
I've found that the update on March 4 modified the contents in the file "/etc/gtk-2.0/gtk.immodules.lib" to

(...)
"/usr/lib/gtk-3.0/3.0.0/immodules/im-scim.so" 
"scim" "SCIM Input Method" "" "" "" 
(...)

So I use the following command "gtk-query-immodules-2.0 > /etc/gtk-2.0/gtk.immodules.lib" as root to update its contents to 

(...)
"/usr/lib/gtk-2.0/2.10.0/immodules/im-ibus.so" 
"ibus" "IBus (Intelligent Input Bus)" "ibus" "" "ja:ko:zh:*" 
(...)

and the workaround "export GTK_IM_MODULE_FILE=/etc/gtk-2.0/gtk.immodules.lib" works again.
Comment 23 Jin-tong Hu 2014-03-06 21:28:56 CET
Sorry, but there are some typos in my last comment. They are not

"/usr/lib/gtk-3.0/3.0.0/immodules/im-scim.so" 
"scim" "SCIM Input Method" "" "" "" 

but

"/usr/lib/gtk-3.0/3.0.0/immodules/im-ibus.so" 
"ibus" "IBus (Intelligent Input Bus)" "ibus" "" "ja:ko:zh:*"
Comment 24 Jin-tong Hu 2014-03-08 01:44:58 CET
My problem in Comment 19 that ibus preference window can't open is solved by installing the ibus-qt4 package.
Comment 25 a b 2014-03-19 09:53:16 CET
Unfortunately the workaround posted in Comment 16 (and the errata) has a serious downside: you can't run any external apps from firefox anymore (they core dump). So things like viewing pdf's, opening various archives, or viewing videos (that aren't directly supported by FF) don't work anymore. This really needs a better fix.

CC: (none) => mageia824

Diep Pham Van 2014-03-21 05:09:55 CET

CC: (none) => imeo
Version: Cauldron => 4

Comment 26 Ethan Merritt 2014-03-21 05:27:00 CET
(In reply to a b from comment #25)
> Unfortunately the workaround posted in Comment 16 (and the errata) has a
> serious downside: you can't run any external apps from firefox anymore (they
> core dump). So things like viewing pdf's, opening various archives, or
> viewing videos (that aren't directly supported by FF) don't work anymore.
> This really needs a better fix.

I am not seeing any such problem in either chrome or firefox.
For firefox I created a wrapper script as shown below.
Chrome already has a wrapper script.

$ cat /usr/bin/firefox
#!/bin/bash
# scim/uim/ibus input requires help from GTK2
export GTK_IM_MODULE_FILE=/etc/gtk-2.0/gtk.immodules.lib64
/usr/lib64/firefox-24.3.0/firefox
Comment 27 Diep Pham Van 2014-03-21 09:38:33 CET
(In reply to Ethan Merritt from comment #26)
> (In reply to a b from comment #25)
> > Unfortunately the workaround posted in Comment 16 (and the errata) has a
> > serious downside: you can't run any external apps from firefox anymore (they
> > core dump). So things like viewing pdf's, opening various archives, or
> > viewing videos (that aren't directly supported by FF) don't work anymore.
> > This really needs a better fix.
> 
> I am not seeing any such problem in either chrome or firefox.
> For firefox I created a wrapper script as shown below.
> Chrome already has a wrapper script.
> 
> $ cat /usr/bin/firefox
> #!/bin/bash
> # scim/uim/ibus input requires help from GTK2
> export GTK_IM_MODULE_FILE=/etc/gtk-2.0/gtk.immodules.lib64
> /usr/lib64/firefox-24.3.0/firefox

I have ibus-gtk installed, and create the wrapper like you and ibus still do not work with firefox.

$ env | grep -i gtk
GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/favadi/.gtkrc-2.0:/home/favadi/.gtkrc-2.0-kde:/home/favadi/.kde4/share/config/gtkrc-2.0
GTK_RC_FILES=/etc/gtk/gtkrc:/home/favadi/.gtkrc:/home/favadi/.kde4/share/config/gtkrc
GTK_MODULES=canberra-gtk-module
GTK_IM_MODULE=ibus

$ ps -ef | grep ibus-daemon
favadi   16303     1  0 15:33 ?        00:00:02 /usr/bin/ibus-daemon-real -d -x
Comment 28 Edward d'Auvergne 2014-04-07 23:00:52 CEST
I have the same problem.  It also does not work in Libreoffice or Skype.  Though IBus has always been a problem in Mageia!

CC: (none) => true.bugman

Comment 29 Ethan Merritt 2014-04-08 02:41:06 CEST
I have to wonder if you aren't seeing some other problem entirely.  Libreoffice is not a gtk2 application, so whatever issues it has are not due to this particular quirk.  I had no difficulty typing CJK text into Libreoffice even before this issue came up, and it continues to work well for me.

For the record, I have the following ibus related packages installed. I do not know if they are all necessary, but in practice they are sufficient.

ibus-ui-gtk3-1.5.4-4.mga4
libuser-0.60-2.mga4
lib64ibus1.0_5-1.5.4-4.mga4
lib64ibus-gir1.0-1.5.4-4.mga4
ibus-gtk-1.5.4-4.mga4
ibus-mozc-1.11.1522.102-6.mga4
ibus-qt4-1.3.1-10.mga4
ibus-anthy-1.5.4-1.mga4
ibus-gtk3-1.5.4-4.mga4
ibus-1.5.4-4.mga4
Comment 30 Edward d'Auvergne 2014-04-08 10:14:34 CEST
No, it is the same problem.  I create the wrapper as attempted in comment #27.  And I still cannot type in Chinese into firefox.

The Libreoffice and Skype problems are both obviously different as the first has its own GUI toolkit and the second is a 32-bit program which uses Qt.  But they are all the same problem - a poorly setup IBus.  The configuration is arcane and not understandable for users, and not well supported in the localisation component of the Mageia control centre (MCC).  If a poor IBus setup is not considered an individual bug, then maybe it needs a tracker bug report like https://bugs.mageia.org/show_bug.cgi?id=11709.

I worked out that the Skype problem only requires the i586 libibus1.0_5-1.5.4-4.mga4 package installed, as 32-bit software requires /usr/lib/libibus* which is not installed by default (which it really should be as 32-bit software on a 64-bit system is not uncommon).  This should be installed without question when 'IBUS' is selected as the 'Input method' in the second page of the MCC localisation wizard!

The Libreoffice and firefox IM problems persist.
Comment 31 Edward d'Auvergne 2014-04-08 10:51:31 CEST
For reference, I found the solution for the Libreoffice IBus IM problem (https://bugs.mageia.org/show_bug.cgi?id=4604#c21), though not the firefox IBus IM problem.
Comment 32 Edward d'Auvergne 2014-04-08 11:23:20 CEST
I've created a separate bug reports for the other software:

- For Skype and 32-bit software at https://bugs.mageia.org/show_bug.cgi?id=13168.
- For Libreoffice at https://bugs.mageia.org/show_bug.cgi?id=13169.
Comment 33 Edward d'Auvergne 2014-04-08 15:48:44 CEST
Now IBus is working when I run:

$ GTK_IM_MODULE_FILE=/etc/gtk-2.0/gtk.immodules.lib64 firefox

Something happened while testing out the 'other' IBus MCC localization bugs:

- For Skype and 32-bit software at https://bugs.mageia.org/show_bug.cgi?id=13168.
- For Libreoffice at https://bugs.mageia.org/show_bug.cgi?id=13169.
- For chromium-browser at https://bugs.mageia.org/show_bug.cgi?id=13170.
- For gvim at https://bugs.mageia.org/show_bug.cgi?id=13171.
- For Chinese as a secondary input at https://bugs.mageia.org/show_bug.cgi?id=13172.

I cannot however work out what changed!  This GTK_IM_MODULE_FILE trick also fixes the chromium-browser and gvim bugs.  I am trying to unsuccessfully replicate this fix in a 32-bit Mageia 4 virtualbox image with:

$ GTK_IM_MODULE_FILE=/etc/gtk-2.0/gtk.immodules.lib firefox

There appears to be no RPM installation log to find out all the recent changes.  Is there a way to query this?
Comment 34 Edward d'Auvergne 2014-04-08 19:30:48 CEST
This bug is identical to the chromium-browser IBus bug (https://bugs.mageia.org/show_bug.cgi?id=13170).  As mentioned in the 2nd comment of that report, in addition to the GTK_IM_MODULE_FILE variable, the following two commands must be run each time you log in to work around the bug:

$ ibus exit
$ ibus-daemon -x -d &
Comment 35 a b 2014-04-13 06:51:20 CEST
(In reply to Ethan Merritt from comment #26)
> (In reply to a b from comment #25)
> > Unfortunately the workaround posted in Comment 16 (and the errata) has a
> > serious downside: you can't run any external apps from firefox anymore (they
> > core dump). So things like viewing pdf's, opening various archives, or
> > viewing videos (that aren't directly supported by FF) don't work anymore.
> > This really needs a better fix.
> 
> I am not seeing any such problem in either chrome or firefox.
> For firefox I created a wrapper script as shown below.
> Chrome already has a wrapper script.
> 
> $ cat /usr/bin/firefox
> #!/bin/bash
> # scim/uim/ibus input requires help from GTK2
> export GTK_IM_MODULE_FILE=/etc/gtk-2.0/gtk.immodules.lib64
> /usr/lib64/firefox-24.3.0/firefox

Yes, this is pretty much exactly what I have. And in Edit -> Preferences -> Applications, "Portable Document Format (PDF)" has the action "Use Document Viewer (default)"; this means it tries to start evince to view the pdf's. Whenever I click on a link to a pdf document, the pdf gets downloaded, FF tries to start evince, but evince just core dumps:

  % file core.15097 
  core.15097: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style, from 'evince /tmp/pdfSample.pdf'

This can also be achieved manually by running evince with the gtk2 modules:

  % env GTK_IM_MODULE_FILE=/etc/gtk-2.0/gtk.immodules.lib64 evince /tmp/pdfSample.pdf
  Segmentation fault (core dumped)

(this is all 64-bit, btw).
Comment 36 Ethan Merritt 2014-04-13 07:46:07 CEST
(In reply to a b from comment #35)
> (In reply to Ethan Merritt from comment #26)
> > (In reply to a b from comment #25)
> > > Unfortunately the workaround posted in Comment 16 (and the errata) has a
> > > serious downside: you can't run any external apps from firefox anymore (they
> > > core dump). So things like viewing pdf's, opening various archives, or
> > > viewing videos (that aren't directly supported by FF) don't work anymore.
> > > This really needs a better fix.
> > 
> > I am not seeing any such problem in either chrome or firefox.
> > For firefox I created a wrapper script as shown below.
> > Chrome already has a wrapper script.
> > 
> > $ cat /usr/bin/firefox
> > #!/bin/bash
> > # scim/uim/ibus input requires help from GTK2
> > export GTK_IM_MODULE_FILE=/etc/gtk-2.0/gtk.immodules.lib64
> > /usr/lib64/firefox-24.3.0/firefox
> 
> Yes, this is pretty much exactly what I have. And in Edit -> Preferences ->
> Applications, "Portable Document Format (PDF)" has the action "Use Document
> Viewer (default)"; this means it tries to start evince to view the pdf's.
> Whenever I click on a link to a pdf document, the pdf gets downloaded, FF
> tries to start evince, but evince just core dumps:
> 
>   % file core.15097 
>   core.15097: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style,
> from 'evince /tmp/pdfSample.pdf'
> 
> This can also be achieved manually by running evince with the gtk2 modules:
> 
>   % env GTK_IM_MODULE_FILE=/etc/gtk-2.0/gtk.immodules.lib64 evince
> /tmp/pdfSample.pdf
>   Segmentation fault (core dumped)

I have no experience with evince, sorry.
okular works without problem in this role for me.ã
For what it's worth, okular also accepts CJK input through ibus+anthy when invoked this way.

If you modify your command above to run evince via strace you could probably get a better handle on what component is failing.  Meanwhile, okular is an excellent alternative.
Comment 37 a b 2014-04-13 13:33:10 CEST
(In reply to Ethan Merritt from comment #36)
> (In reply to a b from comment #35)
> > (In reply to Ethan Merritt from comment #26)
> > > (In reply to a b from comment #25)
> > > > Unfortunately the workaround posted in Comment 16 (and the errata) has a
> > > > serious downside: you can't run any external apps from firefox anymore (they
> > > > core dump). So things like viewing pdf's, opening various archives, or
> > > > viewing videos (that aren't directly supported by FF) don't work anymore.
> > > > This really needs a better fix.
> > > 
> > > I am not seeing any such problem in either chrome or firefox.
[snip]
> > This can also be achieved manually by running evince with the gtk2 modules:
> > 
> >   % env GTK_IM_MODULE_FILE=/etc/gtk-2.0/gtk.immodules.lib64 evince
> > /tmp/pdfSample.pdf
> >   Segmentation fault (core dumped)
> 
> I have no experience with evince, sorry.
> okular works without problem in this role for me.ã
> For what it's worth, okular also accepts CJK input through ibus+anthy when
> invoked this way.

I'm sorry, but saying "just install KDE" is a terrible answer. I'm running GNOME, and I wish to use the GNOME tools, and I have no desire to install and use a whole other set of tools from another desktop.

> If you modify your command above to run evince via strace you could probably
> get a better handle on what component is failing.

Not really:

  11847 <... futex resumed> )             = 1
  11847 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x1} ---

> Meanwhile, okular is an excellent alternative.

I'm sure it's a good reader, but that's entirely beside the point.
Comment 38 Ethan Merritt 2014-04-13 23:39:38 CEST
(In reply to a b from comment #37)
> (In reply to Ethan Merritt from comment #36)
> > (In reply to a b from comment #35)
> > > (In reply to Ethan Merritt from comment #26)
> > > > (In reply to a b from comment #25)
> > > > > Unfortunately the workaround posted in Comment 16 (and the errata) has a
> > > > > serious downside: you can't run any external apps from firefox anymore (they
> > > > > core dump). So things like viewing pdf's, opening various archives, or
> > > > > viewing videos (that aren't directly supported by FF) don't work anymore.
> > > > > This really needs a better fix.
> > > > 
> > > > I am not seeing any such problem in either chrome or firefox.
> [snip]
> > > This can also be achieved manually by running evince with the gtk2 modules:
> > > 
> > >   % env GTK_IM_MODULE_FILE=/etc/gtk-2.0/gtk.immodules.lib64 evince
> > > /tmp/pdfSample.pdf
> > >   Segmentation fault (core dumped)
> > 
> > I have no experience with evince, sorry.
> > okular works without problem in this role for me.ã
> > For what it's worth, okular also accepts CJK input through ibus+anthy when
> > invoked this way.
> 
> I'm sorry, but saying "just install KDE" is a terrible answer. I'm running
> GNOME, and I wish to use the GNOME tools, and I have no desire to install
> and use a whole other set of tools from another desktop.
> 
> > If you modify your command above to run evince via strace you could probably
> > get a better handle on what component is failing.
> 
> Not really:
> 
>   11847 <... futex resumed> )             = 1
>   11847 --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x1} ---
> 
> > Meanwhile, okular is an excellent alternative.
> 
> I'm sure it's a good reader, but that's entirely beside the point.


Oy, oy! Calm down. I said not one word about installing KDE. You are posting to a bug thread reporting problems with firefox, but your example instead demonstrates a problem with evince. I added the data point that firefox successfully triggers and hands off to an equivalent tool, okular, reinforcing the idea that perhaps firefox is not the problem in your case.
Comment 39 Edward d'Auvergne 2014-04-14 09:25:26 CEST
(In reply to a b from comment #35)
> (In reply to Ethan Merritt from comment #26)
> > (In reply to a b from comment #25)
> > > Unfortunately the workaround posted in Comment 16 (and the errata) has a
> > > serious downside: you can't run any external apps from firefox anymore (they
> > > core dump). So things like viewing pdf's, opening various archives, or
> > > viewing videos (that aren't directly supported by FF) don't work anymore.
> > > This really needs a better fix.
> > 
> > I am not seeing any such problem in either chrome or firefox.
> > For firefox I created a wrapper script as shown below.
> > Chrome already has a wrapper script.
> > 
> > $ cat /usr/bin/firefox
> > #!/bin/bash
> > # scim/uim/ibus input requires help from GTK2
> > export GTK_IM_MODULE_FILE=/etc/gtk-2.0/gtk.immodules.lib64
> > /usr/lib64/firefox-24.3.0/firefox
> 
> Yes, this is pretty much exactly what I have. And in Edit -> Preferences ->
> Applications, "Portable Document Format (PDF)" has the action "Use Document
> Viewer (default)"; this means it tries to start evince to view the pdf's.
> Whenever I click on a link to a pdf document, the pdf gets downloaded, FF
> tries to start evince, but evince just core dumps:
> 
>   % file core.15097 
>   core.15097: ELF 64-bit LSB core file x86-64, version 1 (SYSV), SVR4-style,
> from 'evince /tmp/pdfSample.pdf'
> 
> This can also be achieved manually by running evince with the gtk2 modules:
> 
>   % env GTK_IM_MODULE_FILE=/etc/gtk-2.0/gtk.immodules.lib64 evince
> /tmp/pdfSample.pdf
>   Segmentation fault (core dumped)
> 
> (this is all 64-bit, btw).

I see exactly the same problem, though my segfaults are without core dumps.  Setting the GTK_IM_MODULE_FILE environmental variable for everything as in https://wiki.mageia.org/en/Mageia_4_Errata#Internationalization is fatal for all GTK3 software including the Gnome Desktop (https://bugs.mageia.org/show_bug.cgi?id=13170#c6).
Comment 40 a b 2014-04-15 02:23:33 CEST
(In reply to Ethan Merritt from comment #38)
> (In reply to a b from comment #37)
> > (In reply to Ethan Merritt from comment #36)
> > > (In reply to a b from comment #35)
> > > > (In reply to Ethan Merritt from comment #26)
> > > > > (In reply to a b from comment #25)
> > > > > > Unfortunately the workaround posted in Comment 16 (and the errata) has a
> > > > > > serious downside: you can't run any external apps from firefox anymore (they
> > > > > > core dump). So things like viewing pdf's, opening various archives, or
> > > > > > viewing videos (that aren't directly supported by FF) don't work anymore.
> > > > > > This really needs a better fix.
[snip]
> > > > This can also be achieved manually by running evince with the gtk2 modules:
> > > > 
> > > >   % env GTK_IM_MODULE_FILE=/etc/gtk-2.0/gtk.immodules.lib64 evince
> > > > /tmp/pdfSample.pdf
> > > >   Segmentation fault (core dumped)
> > > 
> > > I have no experience with evince, sorry.
> > > okular works without problem in this role for me.ã
> > > For what it's worth, okular also accepts CJK input through ibus+anthy when
> > > invoked this way.
> > 
> > I'm sorry, but saying "just install KDE" is a terrible answer. I'm running
> > GNOME, and I wish to use the GNOME tools, and I have no desire to install
> > and use a whole other set of tools from another desktop.
[snip]
> Oy, oy! Calm down. I said not one word about installing KDE.

Sorry, I'm not upset, and I apologize if my reply came across as such. As to installing KDE, yes, I exagerated a bit, but the fact is that installing KDE apps does pull in a whole bunch of KDE stuff.

> You are posting
> to a bug thread reporting problems with firefox, but your example instead
> demonstrates a problem with evince. I added the data point that firefox
> successfully triggers and hands off to an equivalent tool, okular,
> reinforcing the idea that perhaps firefox is not the problem in your case.

This is not just evince, as I pointed out earlier, but other standard GNOME apps (e.g. file-roller, totem (which may play initially, but SEGV's in certain menu items), etc). In fact, as Edward dAuvergne points out above, the GTK_IM_MODULE_FILE solution appears to affect pretty much all GTK3 apps (which is a majority of the GNOME apps now, I believe). So this really means that if you're running GNOME this workaround is of limited usefulness, unless you're willing to go with KDE apps.
Comment 41 You-Cheng Hsieh 2014-04-22 16:48:17 CEST
I add a warning in the errata that the workaround might cause gtk3 application fail to start. My apology for any inconvenience you encountered after applying the workarounds according to the errata.

The only alternative I can think is that you can try to use some gtk2 applications in Gnome3 with this workaround, though they will be not so fully integrated. For some example, epdfviewer for reader, xarchiver for archive, leafpad for editor, gnome-mplayer for multimedia player.

I understand this is a terrible problem. While some distros seem not affected or have their own solutions, we need to find a way to fix this for mageia 5.

Any help is welcomed.
Comment 42 a b 2014-05-04 04:33:01 CEST
I just noticed Shimingzhou added a far more useful (IMO) workaround to the errata on Apr 4th, namely to run "gtk-query-immodules-2.0 --update-cache" - that works beautifully.

I guess the question is, why isn't /usr/lib64/gtk-2.0/2.10.0/immodules.cache included in the lib64gtk+2.0_0 rpm like it is for the lib64gtk+3_0 rpm?
Comment 43 You-Cheng Hsieh 2014-05-04 10:22:17 CEST
Because immodules.cache is generated by programe and should not be included in rpm.

When you install or uninstall a gtk immodule rpm in Mageia, a command will be run:
%{_bindir}/gtk-query-immodules-2.0 > %{_sysconfdir}/gtk-2.0/gtk.immodules.%_lib
Then it will write the cache file to /etc/gtk-2.0/gtk.immodules.lib(64). This has always worked just fine in Mageia 3 and earlier versions.

Apparently something changed after Mageia 3 released and now it should be run as "gtk-query-immodules-2.0 --update-cache" instead.

All input method packages that include gtk immodules need to be "fixed", e.g. ibus, gcin, hime, fcitx(?).
Diep Pham Van 2014-05-05 04:30:57 CEST

CC: imeo => (none)

Comment 44 You-Cheng Hsieh 2014-05-06 05:22:39 CEST
For mga4:
I updated errata to show the "gtk-query-immodules-2.0 --update-cache" workaround only, since the other way will cause problems for gtk3 apps.
If you already used "export GTK_IM_MODULE_FILE=" workground, please disable or remove it. Sorry for the inconvenience.

For cauldron:
Updated packages of ibus, gcin, hime, scim, fcitx are pushed to mirrors. These will use the new workaround to fix the problem. If you already used "export GTK_IM_MODULE_FILE=" workground, please disable or remove it.

Let's hope this can be fixed before mga5 alpha...
Comment 45 You-Cheng Hsieh 2014-05-06 08:57:06 CEST
I have uploaded updated ibus package of mga4.

To test it, please enable core/updates_testing repo and update or install ibus-gtk. 
Note: If you already used "export GTK_IM_MODULE_FILE=" workground, please disable or remove it.

Updated packages in core/updates_testing:
ibus-gtk-1.5.4-4.1mga4

You may be asked to install other ibus-* packages due to dependency.
Comment 46 You-Cheng Hsieh 2014-05-06 09:50:46 CEST
updated gtk+2.0 for mga4 is uploaded to updates_testing.

it seems ibus-gtk is not installed or included in DVD or liveDVD. So fix in gtk+2.0 is necessary. Please do following to test:
uninstall ibus-gtk
If you already used "export GTK_IM_MODULE_FILE=" workground, please disable or remove it.
delete /usr/lib/gtk-2.0/2.10.0/immodules.cache if this file exists.
enable core/updates_testing repo and update libgtk+2.0

Test if input methods can be used in gtk2 apps, e.g. firefox.

Updated packages in core/updates_testing:
libgtk+2.0-2.24.22-3.1.mga4

You may be asked to install other gtk+2.0 packages due to dependency.

Source RPM: ibus => ibus, gtk+2.0

Comment 47 Edward d'Auvergne 2014-05-07 09:09:33 CEST
I just deleted /usr/lib64 /gtk-2.0/2.10.0/immodules.cache, updated lib64gtk+, and for me this does nothing.  I have ibus turned on now with "Chinese - Pinyin" selected, but these are clearly not Chinese characters.  The 'ibus exit', 'ibus-daemon -x -d &' trick also does not fix it (https://bugs.mageia.org/show_bug.cgi?id=13170#c2).  Just to be sure, on my system I now have:

$ rpm -q lib64gtk+2.0_0
lib64gtk+2.0_0-2.24.22-3.1.mga4
$ locate immodules.cache
/data/python/lib/gtk-2.0/2.10.0/immodules.cache
/data/python/src/gtk+-2.24.23/modules/input/immodules.cache
/mnt/old_usr/lib64/gtk-3.0/3.0.0/immodules.cache
/usr/lib64/gtk-2.0/2.10.0/immodules.cache
/usr/lib64/gtk-3.0/3.0.0/immodules.cache
$

It also doesn't fix the chromium-browser issue (https://bugs.mageia.org/show_bug.cgi?id=13170), or the gvim issue (https://bugs.mageia.org/show_bug.cgi?id=13171).  Note thought, that previously when I ran:

# gtk-query-immodules-2.0 --update-cache

that this also did not fix the problem on my system.  Clearly something else is amiss.
Comment 48 You-Cheng Hsieh 2014-05-20 09:45:06 CEST
After I ran
# gtk-query-immodules-2.0 --update-cache
gvim will accept ibus input, but chromium does not. I agree that something else is causing problem but I have no clue.:(


I need help for testing with a new installed mga4 system.
1.install mga4 (i586 or x86_64)
2.enable update_testing
3.install ibus-gtk-1.5.4-4.2mga4
4.Check if immodules.cache is generated at:
/usr/lib/gtk-2.0/2.10.0/immodules.cache (for i586)
/usr/lib64/gtk-2.0/2.10.0/immodules.cache (for x86_64)
5.run firefox and test if ibus input correctly.

note that if you install a x86_64 system, you should test with x86_64 version of firefox as well.

Updated binary package:
ibus-gtk-1.5.4-4.2mga4

Updated source package:
ibus-1.5.4-4.2mga4
Comment 49 Christian Lohmaier 2015-01-08 00:40:48 CET
(In reply to You-Cheng Hsieh from comment #48)
> After I ran
> # gtk-query-immodules-2.0 --update-cache
> gvim will accept ibus input, but chromium does not. I agree that something
> else is causing problem but I have no clue.:(

For me that fixed the problem though. So please push the update nevertheless. I was puzzled why it didn't work on my fresh install, but worked flawlessly on my laptop (where I had the immodules.cache) - that's the only difference in the two setups.

using $ rpm -qa |grep ibus |grep -v libuser |grep -v scribus |sort
ibus-1.5.4-4.mga4
ibus-gtk-1.5.4-4.mga4
ibus-gtk3-1.5.4-4.mga4
ibus-mozc-1.11.1522.102-6.mga4
ibus-ui-gtk3-1.5.4-4.mga4
lib64ibus-gir1.0-1.5.4-4.mga4
lib64ibus1.0_5-1.5.4-4.mga4

using gnome3 as desktop, meaning gnome-session automatically sets:
$ env |grep ibus
QT_IM_MODULE=ibus
XMODIFIERS=@im=ibus

With those set and the immodules.cache missing â ibus only working in gtk3/native gnome3
after running 

# gtk-query-immodules-2.0 --update-cache

â ibus also working in gtk2 apps like chromium browserãor firefox

CC: (none) => lohmaier+mageia

Comment 50 You-Cheng Hsieh 2015-01-08 03:06:21 CET
Sorry, the ibus updates for testing was removed. For mga4, please use 
# gtk-query-immodules-2.0 --update-cache
command as workaround.

The problem is fixed in current cauldron. I will test each mga5 development releases for new install, so hopefully it will not re-appear again.
Comment 51 Manuel Hiebel 2015-02-06 23:58:21 CET
(In reply to You-Cheng Hsieh from comment #50)
> Sorry, the ibus updates for testing was removed. For mga4, please use 
> # gtk-query-immodules-2.0 --update-cache
> command as workaround.
> 
> The problem is fixed in current cauldron. I will test each mga5 development
> releases for new install, so hopefully it will not re-appear again.

Hi, did you tested recently if everything was still on cauldron ?
Comment 52 You-Cheng Hsieh 2015-02-07 11:25:09 CET
I cannot say that "everything" works correctly. For my daily usage, it works just fine. At least the bug topic is not replicable.
Comment 53 Samuel Verschelde 2015-09-21 13:19:28 CEST
Mageia 4 changed to end-of-life (EOL) status on 2015-09-19. It is is no longer 
maintained, which means that it will not receive any further security or bug 
fix updates.

Package Maintainer: If you wish for this bug to remain open because you plan to 
fix it in a currently maintained version, simply change the 'version' to a later 
Mageia version.

Bug Reporter: Thank you for reporting this issue and we are sorry that we weren't 
able to fix it before Mageia 4's end of life. If you are able to reproduce it 
against a later version of Mageia, you are encouraged to click on "Version" and 
change it against that version of Mageia. If it's valid in several versions, 
select the highest and add MGAxTOO in whiteboard for each other valid release.
Example: it's valid in cauldron and Mageia 5, set to cauldron and add MGA5TOO.

Although we aim to fix as many bugs as possible during every release's lifetime, 
sometimes those efforts are overtaken by events. Often a more recent Mageia 
release includes newer upstream software that fixes bugs or makes them obsolete.

If you would like to help fixing bugs in the future, don't hesitate to join the
packager team via our mentoring program [1] or join the teams that fit you 
most [2].

[1] https://wiki.mageia.org/en/Becoming_a_Mageia_Packager
[2] http://www.mageia.org/contribute/
Zombie Ryushu 2015-09-21 17:35:34 CEST

CC: (none) => zombie_ryushu
Version: 4 => Cauldron
Whiteboard: (none) => MGA4TOO MGA5TOO

Zombie Ryushu 2015-09-21 17:37:01 CEST

See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=16790

Comment 54 Marja Van Waes 2016-03-09 20:49:48 CET
Last time someone confirmed this problem, was over a year ago. Is this bug still valid in cauldron and/or Mageia 5?

If so: I got lost reading the many comments. Are ibus and gtk+2.0 indeed the culprits, as shown in the "Source RPM:" field

Keywords: (none) => NEEDINFO
CC: (none) => marja11
Whiteboard: MGA4TOO MGA5TOO => MGA5TOO

Comment 55 Zombie Ryushu 2016-03-09 20:51:59 CET
Yes, this bug is still an issue. it is an issue with Rosa too. For some reason Fedora is not affected.
Comment 56 You-Cheng Hsieh 2016-03-10 03:56:52 CET
This bug is not reproducible on my mga5 and cauldron. Could you list your 
/etc/mageia-release
firefox rpm version
ibus rpm version
and the rpm version of the input-method which you use, e.g. ibus-pinyin
Comment 57 Zombie Ryushu 2016-03-10 05:00:27 CET
Try using a GTK2, QT/KDE and GTK3 Application at the same time.
Comment 58 Marja Van Waes 2016-03-10 09:10:47 CET
(In reply to Zombie Ryushu from comment #57)
> Try using a GTK2, QT/KDE and GTK3 Application at the same time.

Could you please be as kind as to answer Hsieh's questions, too?:
(In reply to You-Cheng Hsieh from comment #56)
> Could you list your 
> /etc/mageia-release
> firefox rpm version
> ibus rpm version
> and the rpm version of the input-method which you use, e.g. ibus-pinyin
Comment 59 You-Cheng Hsieh 2016-03-10 11:12:35 CET
Created attachment 7541 [details]
using multiple app and input Chinese

Yes, I can use a gtk2, qt, gtk3 application and firefox and input Chinese at the same time.
Comment 60 You-Cheng Hsieh 2016-03-10 11:21:09 CET
Created attachment 7542 [details]
how to print info we need

Just in case, you can type these commands in konsole or any terminal to print the info I asked:
cat /etc/mageia-release
rpm -qa | grep ibus
rpm -qa | grep firefox

And it's recommended to point out which ibus input method you are using. It's very likely I don't know how to use the input method you use, but I can ask for tester in i18n mailling list.
Comment 61 You-Cheng Hsieh 2016-03-29 09:54:25 CEST
I would like to suggest closing this bug since this problem is not reproducible in both mga5 and cauldron at the moment. If anyone do find they have problem with ibus or input method, please report a new bug and provide necessary info so that we could help.
Comment 62 Thierry Vignaud 2016-03-29 11:17:28 CEST
Note that firefox is now compiled to use Gtk+3 instead of Gtk+2 on cauldron
Comment 63 Marja Van Waes 2016-05-01 10:05:06 CEST
(In reply to You-Cheng Hsieh from comment #61)
> I would like to suggest closing this bug since this problem is not
> reproducible in both mga5 and cauldron at the moment.

Closing as fixed

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.