I thought it should be an easy task, while not…
My Env:
locale: en_US.UTF-8
kernel: 3.10.0-123.4.2.el7.x86_64
I removed ibus related rpms except “ibus-libs”, as it’s required by gnome/gtk.
then build all fcitx packages:
From:
1 2 |
fcitx-4.2.8.4-1.fc20.src.rpm fcitx-configtool-0.4.7-2.fc20.src.rpm |
To:
1 2 3 4 5 6 7 8 9 10 |
fcitx-libs-4.2.8.4-1.el7.centos.x86_64 fcitx-gtk3-4.2.8.4-1.el7.centos.x86_64 fcitx-gtk2-4.2.8.4-1.el7.centos.x86_64 fcitx-table-4.2.8.4-1.el7.centos.x86_64 fcitx-configtool-0.4.7-2.el7.centos.x86_64 fcitx-data-4.2.8.4-1.el7.centos.noarch fcitx-pinyin-4.2.8.4-1.el7.centos.x86_64 fcitx-devel-4.2.8.4-1.el7.centos.x86_64 fcitx-4.2.8.4-1.el7.centos.x86_64 fcitx-table-chinese-4.2.8.4-1.el7.centos.noarch |
switch im doesnt work.
I have to rebuild package: imsettings and im-chooser. as the origin one doesnt enable support for XFCE.
1. fetch following packages: (as f20 doesnt provide the latest im-chooser package, I use el7 version.)
1 2 |
im-chooser-1.6.4-4.el7.src.rpm imsettings-1.6.7-1.fc20.src.rpm |
2. modify spec to support el7. (enable xfce supports)
1 2 3 4 |
[root@t430z tmp]# diff im-chooser.spec /home/suse/workspace/im-chooser.spec 8a9,10 > %global _with_xfce 1 > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
[root@t430z tmp]# diff imsettings.spec /home/suse/workspace/imsettings.spec 12d11 < %if !0%{?rhel} 14d12 < %endif 118d115 < %if !0%{?rhel} 189d185 < %endif 218,220c214 < %if 0%{?rhel} < rm -f $RPM_BUILD_ROOT%{_libdir}/imsettings/libimsettings-{lxde,xfce,mate-gsettings}.so < %endif --- > #rm -f $RPM_BUILD_ROOT%{_libdir}/imsettings/libimsettings-{lxde,xfce,mate-gsettings}.so 293d286 < %if !0%{?rhel} 309d301 < %endif |
3. im-chooser build has deps on imsettings-devel:
build imsettings first and inst devel pkg :
1 2 3 4 |
[root@t430z workspace]# rpm -Uvh /root/rpmbuild/RPMS/x86_64/imsettings-devel-1.6.7-1.el7.centos.x86_64.rpm --nodeps Preparing... ################################# [100%] Updating / installing... 1:imsettings-devel-1.6.7-1.el7.cent################################# [100%] |
4. after all packages built, install/update:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
[root@t430z x86_64]# rpm -Uvh imsettings-xfce-1.6.7-1.el7.centos.x86_64.rpm imsettings-1.6.7-1.el7.centos.x86_64.rpm imsettings-gsettings-1.6.7-1.el7.centos.x86_64.rpm imsettings-libs-1.6.7-1.el7.centos.x86_64.rpm im-chooser-xfce-1.6.4-4.el7.centos.x86_64.rpm im-chooser-common-1.6.4-4.el7.centos.x86_64.rpm im-chooser-1.6.4-4.el7.centos.x86_64.rpm Preparing... ################################# [100%] Updating / installing... 1:imsettings-libs-1.6.7-1.el7.cento################################# [ 8%] 2:im-chooser-xfce-1.6.4-4.el7.cento################################# [ 17%] 3:im-chooser-common-1.6.4-4.el7.cen################################# [ 25%] 4:imsettings-1.6.7-1.el7.centos ################################# [ 33%] 5:imsettings-xfce-1.6.7-1.el7.cento################################# [ 42%] 6:imsettings-gsettings-1.6.7-1.el7.################################# [ 50%] 7:im-chooser-1.6.4-4.el7.centos ################################# [ 58%] Cleaning up / removing... 8:im-chooser-1.6.4-4.el7 ################################# [ 67%] 9:im-chooser-common-1.6.4-4.el7 ################################# [ 75%] 10:imsettings-gsettings-1.6.3-9.el7 ################################# [ 83%] 11:imsettings-1.6.3-9.el7 ################################# [ 92%] 12:imsettings-libs-1.6.3-9.el7 ################################# [100%] |
5. change immodules.cache as Im using en locale.
1 2 3 4 5 6 7 8 9 |
[root@t430z tmp]# cat /usr/lib64/gtk-2.0/2.10.0/immodules.cache # GTK+ Input Method Modules file # Automatically generated file, do not edit # Created by gtk-query-immodules-2.0-64 from gtk+-2.24.22 # # ModulesPath = /root/.gtk-2.0/2.10.0/x86_64-redhat-linux-gnu/immodules:/root/.gtk-2.0/2.10.0/immodules:/root/.gtk-2.0/x86_64-redhat-linux-gnu/immodules:/root/.gtk-2.0/immodules:/usr/lib64/gtk-2.0/2.10.0/x86_64-redhat-linux-gnu/immodules:/usr/lib64/gtk-2.0/2.10.0/immodules:/usr/lib64/gtk-2.0/x86_64-redhat-linux-gnu/immodules:/usr/lib64/gtk-2.0/immodules # "/usr/lib64/gtk-2.0/2.10.0/immodules/im-fcitx.so" "fcitx" "Fcitx (Flexible Input Method Framework)" "fcitx" "/usr/share/locale" "en:ja:ko:zh" |
6. reboot, and use imsettings-switch, im-chooser to choose fcitx. reboot.
If you hit issues, you may try w/r here:
Note for GNOME Later than 3.6