I am using Arch Linux. Recently updated an old computer, the IBus from 1.4 to 1.5. As a result, there were two problems.
Cannot input anymore in any window, except Opera(?)
IBus Pinyin cannot change to “Full pinyin” mode, but only “Double pinyin” mode.
For the first problem, it doesn’t happen in my other computers. For the second problem, it happened in my other laptops.
To solve the first problem, I tried several ways. Deleting the “~/.ibus”, “~/.cache/ibus”, “~/.config/ibus”, and “.gconf/desktop/ibus”, none of them can reset IBus to the default setting (initial setting). I wanted to reset the configuration because I know that it should work well, because it does work well in my other computers. However, none of the directories is able to solve the problem, finally I chose to reset the GConf and dconf. (I personally think that dconf is the one storing the latest version’s setting).
So, before reset, I backup the GConf and dconf first,
gconftool-2 --recursive-unset /desktop/ibus
gconftool-2 --recursive-unset /schemas/desktop/ibus
dconf reset -f /desktop/ibus/ #trailing / is important
(Please note that, for the GConf, even we unset the keys, some of the keys will still appear. They are generated automatically.)
By making the reset, start the IBus daemon, now, it works fine.
For the second problem, I don’t have exact solution for IBus Pinyin. I tried to solve this problem before, by using git version. Then revert back to non-git version after new version released. Yet this time, the git version is unable to be compiled. Therefore, my solution is to use another pinyin method, such as ibus-googlepinyin and ibus-sunpinyin. Furthermore, Fcitx is another possible solution to solve the problem.
I have installed all the fonts using winetricks with allfonts. I have also used winetricks to set fakechinese, fakejapanese, fakekorean. But none of these tricks work fine on my Wine.
Changing locale works fine, “env LANG=zh_CN.gbk wine notepad”. The menu is okay, but in some dialogs, some characters are still missing.
To solve it, make sure you have installed several fonts, from winetricks or from the package manager. I have installed allfonts from winetricks and other fonts using pacman. Wine is able to use external fonts.
In order to make the CJK fonts display properly, firstly, we need to know what type of system font is used in the different locale,
env LANG=zh_CN.gbk wine regedit
Then, we look into the “HKLM\Software\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink” to check what is the system font that is used in this locale.
(I just found that, for the newer version of Wine, mine is 1.5.6, there is no registry key as mentioned above. But we can still get the information in “HKLM\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes“, look at the MS Shell Dlg. It will show the font that used in the Windows Dialog.)
For my experience, I can see the following fonts in different locale
SimSun in zh_CN.gbk
PMingLiu in zh_TW.big5
MS UI Gothic in ja_JP.utf8
Lucida Sans Unicode, Tahoma, Microsoft Sans Serif.
Now, to make them work properly, we need to add the key “HKCU\Software\Wine\Fonts\Replacements” as mentioned here.
Then, add the string value with those system font name, such as SimSun, PMingLiu, MS UI Gothic.
For the data, we need to use the font name. The font name we can get from “HKCU\Software\Wine\Fonts\Cache”, see all the keys. We need to use the font name based on those key, not the “English Name”.
After setting this registry, we should able to read the fonts correctly.
My registry is
Lucida Sans Unicode = Lucida Console (external, get from ttf-mac-fonts)
Microsoft Sans Serif = MS Sans Serif (installed with wine)
MS UI Gothic = TakaoGothic (installed through winetricks)
PMingLiu = AR PL Ukai TW (external, get from ttf-arphic-ukai)
SimSun = AR PL Ukai CN (external, get from ttf-arphic-ukai)
Tahoma = Tahoma (installed through winetricks)
I am not sure does Tahoma setting is useless or not. But this setting works fine for me. Now, start the notepad with different locale, everything should work fine.
Now, after this setting, even the tray icon with CJK tooltip also works fine.
IBus input method
I tried to play a game with traditional Chinese characters, namely Big5. In the game, I cannot input the Chinese characters with IBus input method. I asked in Wine Forum (here), but no one can answer me how to solve it. But today, after solving the CJK problem, I also manage to solve this IBus input problem.
Firstly, we must enable IBus to run properly, we must set the environment variables,