[Bug 941052] New: /etc/X11/xim is broken: input methods (Fcitx, IBus and etc) do not start at all
http://bugzilla.opensuse.org/show_bug.cgi?id=941052 Bug ID: 941052 Summary: /etc/X11/xim is broken: input methods (Fcitx, IBus and etc) do not start at all Classification: openSUSE Product: openSUSE Factory Version: 201505* Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: X11 Applications Assignee: bnc-team-screening@forge.provo.novell.com Reporter: ftake@geeko.jp QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- /etc/X11/xim on Tumbleweeed forces /bin/sh although it still contains some bashisms. Thereby, all the input methods launched by this script do not start at all. https://build.opensuse.org/package/rdiff/X11:Utilities/x11-tools?linkrev=base&rev=26 We need to remove bashisms not only from /bin/X11/xim but also from scripts (/bin/) sourced by this script. The scripts are contained in IM packages in M17N projects such as fcitx, ibus, gcin, scim, ... -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=941052
http://bugzilla.opensuse.org/show_bug.cgi?id=941052#c1
Fuminobu Takeyama
http://bugzilla.opensuse.org/show_bug.cgi?id=941052 http://bugzilla.opensuse.org/show_bug.cgi?id=941052#c2 Marguerite Su changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |johnj0443@yahoo.com --- Comment #2 from Marguerite Su --- *** Bug 940779 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=941052 http://bugzilla.opensuse.org/show_bug.cgi?id=941052#c3 --- Comment #3 from Marguerite Su --- Hi, ftake, I am not familiar with differences between sh and bash, can you please help fix for fcitx? Marguerite -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=941052
http://bugzilla.opensuse.org/show_bug.cgi?id=941052#c4
Takashi Iwai
http://bugzilla.opensuse.org/show_bug.cgi?id=941052
http://bugzilla.opensuse.org/show_bug.cgi?id=941052#c5
--- Comment #5 from John Jiang
Doesn't it really start at all, or "may not" start? I thought we've always used bash as the primary shell unlike Debian.
It doesn't start automatically with the system. I could open it manually, while it shows "no input window". I am new of linux, unfamiliar with the kernel and only have to wait for help. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=941052
http://bugzilla.opensuse.org/show_bug.cgi?id=941052#c6
--- Comment #6 from Takashi Iwai
http://bugzilla.opensuse.org/show_bug.cgi?id=941052
http://bugzilla.opensuse.org/show_bug.cgi?id=941052#c7
--- Comment #7 from Fuminobu Takeyama
http://bugzilla.opensuse.org/show_bug.cgi?id=941052
http://bugzilla.opensuse.org/show_bug.cgi?id=941052#c8
--- Comment #8 from Takashi Iwai
http://bugzilla.opensuse.org/show_bug.cgi?id=941052 http://bugzilla.opensuse.org/show_bug.cgi?id=941052#c9 --- Comment #9 from Marguerite Su --- "#!/bin/sh" == "#!/usr/bin/bash --posix" :-( so we have to make our scripts with pure sh (not only for bash in posix mode, but also for other possibilities, just in case), so I think the if type -p fcitx >/dev/null 2&>1 ; then stuff should be changed to if [ -x /usr/bin/fcitx ] ; then and "return 0" should be changed to "exit 0" :-( You can use "bash --posix -x /etc/X11/xim.d/fcitx" to test if that script is compatible with sh. Marguerite -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=941052 http://bugzilla.opensuse.org/show_bug.cgi?id=941052#c10 --- Comment #10 from Marguerite Su --- Created attachment 643329 --> http://bugzilla.opensuse.org/attachment.cgi?id=643329&action=edit new autostart script (In reply to John Jiang from comment #5)
It doesn't start automatically with the system. I could open it manually, while it shows "no input window". I am new of linux, unfamiliar with the kernel and only have to wait for help.
please download this and sudo cp -r xim.d-fcitx /etc/X11/xim.d/fcitx and restart to see if it works. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=941052
http://bugzilla.opensuse.org/show_bug.cgi?id=941052#c11
Takashi Iwai
http://bugzilla.opensuse.org/show_bug.cgi?id=941052 http://bugzilla.opensuse.org/show_bug.cgi?id=941052#c12 Marguerite Su changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #643329|0 |1 is obsolete| | --- Comment #12 from Marguerite Su --- Created attachment 643349 --> http://bugzilla.opensuse.org/attachment.cgi?id=643349&action=edit new autostart script (In reply to Marguerite Su from comment #9)
and "return 0" should be changed to "exit 0"
Sorry, return can't be replaced by exit. exit will quit the current shell, then you can't login to the desktop... I define functions to achieve return function success { return 0 } then use $success to do the job...complicated. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=941052
http://bugzilla.opensuse.org/show_bug.cgi?id=941052#c13
--- Comment #13 from Fuminobu Takeyama
http://bugzilla.opensuse.org/show_bug.cgi?id=941052 http://bugzilla.opensuse.org/show_bug.cgi?id=941052#c14 --- Comment #14 from Marguerite Su --- @ftake, Yes, you're right, I was over reactive. "return" still works.
It seems that the script does not exit when fcitx is not found
Actually: 1. These kind of scripts come and go with IMF packages...I can't get the reason to still check the availibility of the IMFs...just for logic completeness? 2. I wrote a warning in the check sentence, if fcitx is not found, there should be something being logged. But I couldn't find such messages anywhere...so I'm not able to know if the script still continue or not... -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=941052
http://bugzilla.opensuse.org/show_bug.cgi?id=941052#c15
--- Comment #15 from Fuminobu Takeyama
1. These kind of scripts come and go with IMF packages...I can't get the reason to still check the availibility of the IMFs...
I also think so.
2. I wrote a warning in the check sentence, if fcitx is not found, there should be something being logged. But I couldn't find such messages anywhere...
At least, for kdm, the script now need to print messages into stderr to keep the messages in ~/.xsession-errors*. The behavior of kdm was changed recently. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=941052
http://bugzilla.opensuse.org/show_bug.cgi?id=941052#c16
--- Comment #16 from Takashi Iwai
I updated to the latest Tumbleweed. /etc/X11/xim is still broken. Maybe it fails to find an appropriate IMF.
It works fine on my machines (both using fcitx). Do you have an error message? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=941052
http://bugzilla.opensuse.org/show_bug.cgi?id=941052#c17
--- Comment #17 from Fuminobu Takeyama
http://bugzilla.opensuse.org/show_bug.cgi?id=941052
http://bugzilla.opensuse.org/show_bug.cgi?id=941052#c18
--- Comment #18 from Takashi Iwai
No error message (stdout is filtered out by kdm)
If INPUT_METHOD=ibus is specified in ~/.i18n then IBus starts as expected.
There seems to be some problems with auto selecting depending on the locale.
INPUT_METHOD= LANG=ja_JP.UTF-8 QT_IM_MODULE=xim XMODIFIERS=@im=local GTK_IM_MODULE=cedilla QT_IM_SWITCHER=imsw-multi
Clearly, /etc/X11/xim.d/none is selected for my environment.
OK, I could reproduce the problem on a VM locally. This looks like a syntax error at setting $tmplang: tmplang=${LC_ALL-${LC_CTYPE-${LANG-en_US}}} This works in *some* cases by some reason, but not in the new xim script. This should be tmplang=${LC_ALL:-${LC_CTYPE:-${LANG:-en_US}}} instead. I have no idea what triggered the behavior change (it's rather the correct behavior now), but the fix should go into FACTORY, at least... -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=941052
http://bugzilla.opensuse.org/show_bug.cgi?id=941052#c19
Takashi Iwai
http://bugzilla.opensuse.org/show_bug.cgi?id=941052
http://bugzilla.opensuse.org/show_bug.cgi?id=941052#c20
--- Comment #20 from Takashi Iwai
http://bugzilla.opensuse.org/show_bug.cgi?id=941052
http://bugzilla.opensuse.org/show_bug.cgi?id=941052#c21
Fuminobu Takeyama
Alternatively, does the patch below work?
--- xim.old 2015-08-18 19:00:40.058879542 +0200 +++ xim 2015-08-18 19:33:56.380357922 +0200 @@ -70,7 +70,7 @@ eval $(set +u +e . /etc/profile.d/lang.sh < /dev/null > /dev/null 2>&1 for cur in $var; do - echo export $cur=${!cur} + test -n "${!cur}" && echo export $cur=${!cur} done) return fi
The ~/.i18n, which is provided by the package, contains only comments. The change above prevents from exporting empty "INPUT_METHOD" variable. Thanks -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=941052
http://bugzilla.opensuse.org/show_bug.cgi?id=941052#c22
--- Comment #22 from Takashi Iwai
participants (1)
-
bugzilla_noreply@novell.com