Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 650348 - app-i18n/imsettings-1.7.2 breaks app-i18n/ibus, app-i18n/fcitx, etc.
Summary: app-i18n/imsettings-1.7.2 breaks app-i18n/ibus, app-i18n/fcitx, etc.
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: CJK Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-13 02:02 UTC by augustin
Modified: 2020-02-18 17:24 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description augustin 2018-03-13 02:02:59 UTC
I had  app-i18n/fcitx properly configured and usable, when one day it stopped working altogether. After a few days of investigation, many hours wasted in chasing dead ends, I finally found the cause: a few days earlier, I had emerged app-i18n/imsettings, for testing purposes, as I was struggling to configure ibus on another system.

Even without running any of app-i18n/imsettings, the mere fact of installing it, breaks the input system configurations of every users on the system. 
The culprit is the included script that is run when starting any X11 session:
/etc/X11/xinit/xinitrc.d/90-xinput 

This script also invalidates all the instructions found in the Gentoo wiki to install ibus, fcitx and other input methods, which suggest to add environment variables within ~/.xprofile.


For the longest while, I was confused by the following output:

$ cat ~/.xprofile | grep QT_IM_MODULE
export QT_IM_MODULE=fcitx
$ echo $QT_IM_MODULE
xim

Only when I found the script 90-xinput and investigated its content did the reason become apparent:
1- the script is run after ~/.xprofile has been sourced.
2- the script unsets and reconfigures the given environment variables.

What's worse, the script is incompatible with fcitx because of:
https://bugs.gentoo.org/650344 

Worst, the system administrator may emerge this package, and *all* users on the system will be adversely affected even if they had previously properly configured their ~/.xprofile, and they wouldn't even know why.

I think a proper fix should require a gentoo-wide policy that would affect all input method related packages, as well as their related gentoo wiki articles.

All input method related packages (fcitx, ibus, uim, scim, im-chooser, imsettings, etc) should follow the same guidelines (to be established) and use the same canonical location for users to configure their input methods (the above scripts suggests ~/.config/imsettings/xinputrc instead of ~/.xprofile).


The overall goals should be thus:

1) Installing and configuring input methods should be easy.
2) It should work out of the box, inasmuch as possible.
3) Adding a new package (e.g. app-i18n/imsettings) should *add* value to the system by providing new functionality, not *subtract* value (by breaking a previously perfectly running system).
4) In case of a misconfiguration, there should be clearly identifiable logs that properly explain what is wrong, with a proper pointer to the solution, so that user can quickly and easily identify the problem and recover from it.
5) Gentoo should enforce this standard, by requiring/strongly suggesting that input method packages depend on app-i18n/im-chooser which provides both a GUI and a simple script interface for users to easily switch input methods (without requiring to restart the x-session). Alternatively, a simple eselect-like tool for users could do the job.


Canonical configuration files should be placed within /etc/X11/xinit/xinput.d/:
http://linux.overshoot.tv/etc/X11/xinit/xinput.d
The common input method selection tool can then add a symlink at the appropriate place to the appropriate file as im-chooser does.

Thus, the installation procedure for *all* input method would be both identical and simplified:
1- emerge the desired input method package.
2- eselect/im-chooser the input method (no need to mess with ~/.xprofile nor other files).
3- configure the input method specific settings.
4- Done. Use happily.
Comment 1 Arfrever Frehtes Taifersar Arahesis 2018-03-13 02:50:09 UTC
(In reply to augustin from comment #0)

Terminology: Fcitx, IBus etc. are input method frameworks. Input methods are e.g. pinyin or hangul.

> Even without running any of app-i18n/imsettings, the mere fact of installing
> it, breaks the input system configurations of every users on the system. 
> The culprit is the included script that is run when starting any X11 session:
> /etc/X11/xinit/xinitrc.d/90-xinput

Better to somehow change app-i18n/imsettings to not affect every user...

> 5) Gentoo should enforce this standard, by requiring/strongly suggesting
> that input method packages depend on app-i18n/im-chooser which provides both
> a GUI and a simple script interface for users to easily switch input methods
> (without requiring to restart the x-session). Alternatively, a simple
> eselect-like tool for users could do the job.

Neither app-i18n/im-chooser nor eselect-like tool should be required.

app-i18n/im-chooser is a GTK+ application...
KDE provides KIMPanel which provides better integration with KDE and supports Fcitx, IBus and SCIM.

I think that almost each user chooses one of Fcitx/IBus/SCIM/UIM and continuously uses only this chosen input method framework (until it breaks...).

Personally I like ~/.xprofile.

So we might think about how to improve life for users who have app-i18n/imsettings, but without forcing other users to install any new tool.
Comment 2 augustin 2018-03-13 02:55:51 UTC
I cannot find KIMPanel. Which package is it in?
Comment 3 Arfrever Frehtes Taifersar Arahesis 2018-03-13 02:59:45 UTC
(In reply to augustin from comment #2)
> I cannot find KIMPanel. Which package is it in?

kde-plasma/plasma-desktop (since 5.6.0, previously kde-plasma/kdeplasma-addons)
Comment 4 augustin 2018-03-13 03:23:33 UTC
I do have kde-plasma/kdeplasma-addons-5.11.5 installed.
I still don't see kimpanel. How to run it and how to use it to easily select a chosen input method framework?

My overarching goals are that of usability and user-friendliness. Gentoo should not be synonymous to geeky/hard to install nor to use. On the contrary: I like portage/emerge a lot because of its clear coloured output, and the appropriate pointers it provides, leading even a newbie user to the proper place to learn more and the proper action to take. 

In 17 years of linux usage, I always found configuring chinese input a hurdle, which sometimes proved to be insurmountable. 
So, whatever solution is adopted, it should be judged according to the following principles (revised from above):

1) Installing and configuring input method frameworks should be easy.
2) It should work out of the box, inasmuch as possible.
3) Adding a new package should *add* value to the system by providing new functionality, not *subtract* value (by breaking a previously perfectly running system).
4) In case of a misconfiguration, there should be clearly identifiable logs that properly explain what is wrong, with a proper pointer to the solution, so that user can quickly and easily identify the problem and recover from it.

My experience in installing and configuring chinese input frameworks have always failed any definition of usability:
http://temp.lesenjeux.fr/website-usability-faktoren.png
http://temp.lesenjeux.fr/Usability.jpg
http://temp.lesenjeux.fr/venn_usability.png

And by judging the amount of forum threads I came across that discuss the same frustrations I experienced, I think it is high time a Linux distribution came to make things easy and consistent.
Comment 5 Arfrever Frehtes Taifersar Arahesis 2018-03-13 03:44:00 UTC
(In reply to augustin from comment #4)

> I still don't see kimpanel. How to run it

https://userbase.kde.org/Plasma#Widgets
"Add Widgets" -> "Input Method Panel" (name can be translated)
Comment 6 Pavel 2020-02-18 17:24:34 UTC
Can confirm