This project is for the fcitx packages to Crux Linux x86_64.
If you use i686 Crux, you need to check Pkgfile and remove the "-DLIB_INSTALL_DIR=/usr/lib64" option.
I also provided prebuilt binaries in fcitx and fcitx-configtool folders, enjoy! :)
You can change and redistribute it as you like, no credits :)
This is targeted for Chinese users who want to use fcitx on Crux.
Assuming you have these two packages installed. Follow these steps:
(0) Add fcitx to your WM autostart process, e.g. in fluxbox, run: $echo "fcitx &" >> ~/.fluxbox/startup
(1) fcitx cannot use the POSIX or C locales, you need to change them. Run $locale and you will find you are in POSIX. To change it, run as root: localedef -c -f UTF-8 -i en_US en_US. Set "export LANG=en_US.UTF-8 && export LC_ALL=en_US" in either: ~/.xinitrc (before exec): if you use startx or slim, ~/.prfile or ~/.xprofile: if you are using lightdm or other display manager
(2) Set "export LANG=en_US.UTF-8 && export LC_ALL=en_US" in your /etc/locale.conf or optionally in your /etc/profile
(3) You also need to export gtk2, gtk3 and qt4 IM module as:
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx"
in either:
* /etc/profile,
* ~/.xinitrc (for startx or slim "before exec"),
* ~/.profile (or ~/.xprofile for lightdm etc)
(4) Create a xinput daemon also using: mkdir /etc/X11/xinit/xinput.d/ and create two files: touch en_US fcitx both have the same content as following:
XMODIFIERS="@im=fcitx"
XIM=fcitx
XIM_PROGRAM=/usr/bin/fcitx
XIM_ARGS=""
GTK_IM_MODULE=XIM
QT_IM_MODULE=XIM
DEPENDS="fcitx"
(5) Ensure you have right permission for both files: $ ls -l /etc/X11/xinit/xinput.d/{en_US, fcitx} -rw-r--r-- 1 root root 123 Dec 3 16:44 /etc/X11/xinit/xinput.d/en_US -rw-r--r-- 1 root root 124 Dec 3 16:44 /etc/X11/xinit/xinput.d/fcitx
(6) Restart your X session
(7) You will find a fcitx icon on your system tray or toolbar or panel, then right click==>configure==>add pinyin and make sure you have the keyboard US enabled
(optional) Restart your X session again.
(8) Test and enjoy :)