SoFunction
Updated on 2025-03-10

[Linux] Input method xsim installation method

Hope this article can solve the problems you encountered when installing xsim

xsim can be obtained from /projects/xsim. The current stable version is 0.3.9.4. It is strongly recommended that you log in to the system as root to perform the installation, so that some inexplicable problems can be avoided.

First, please check whether the package is fully installed. C++, db, db-devel are required. If you want to place the status window on the task bar of KDE, you need to have the kdelibs3-devel package in the system.

Next, check locale. I believe everyone is a Chinese locale. If you need to enter GBK Chinese characters so that root users can also use xsim, or use xsim in an English environment, please modify the locale configuration file and modify the corresponding content as follows:

RC_LANG=”zh_CN.gbk”
ROOT_USES_LANG=”yes”

Log in again after modification to make the modification take effect. OK, now officially enters the installation process.

tar zxf xsim-0.3.9.
cd xsim-0.3.0.4
./configure --help *Look at more options, which will help you, for example, if you want to install xsim to another directory./configure
*The default cn-locale is gb2312. If your locale is changed to gbk, add the option --with-cn-locale=GBK
*Show the status window on the KDE task bar, plus option --enable-status-kde3
*Change the installation directory, such as /opt, option --prefix=/opt/xsim, the default directory is /usr/local/xsim

make
make install
make install-data

At this point, xsim has been installed in your machine, you can open the console and run #xsim.


Check whether the word "Refined" appears, press ctrl space, and the word "Refined" turns green, indicating that the installation is successful. Otherwise, please restart the machine and try it. If the console prompts that the command xsim cannot be found, please establish a command link for xsim in the user search path. This is crucial, remember.

If your machine is only used by yourself, run chmod 666 /usr/local/xsim/dat/*. If it is used by multiple people, create folders .xsim, cp /usr/local/xsim/etc/xsimrc and /usr/local/xsim/dat under $HOME, modify .xsim/xsimrc, and re-specify the path of DICT_LOCAL.

In order to enable xsim to run automatically when the user logs in, you can refer to the method to create a file link xsim under $HOME/.kde/Autostart. But sometimes this method fails, why? The key is a file .xim in the user directory. There was a misunderstanding before. Some users think that xcin must be installed first, but in fact they don't need it. If you see that there is a .xim file in your HOME directory, don't create a link to xsim in ./kde/Autostar. Refer to the following content to directly modify the corresponding content in .xim:

if type -p xcin > /dev/null 2>&1 ; then
export XMODIFIERS="@im=xcin-$tmplang"
LANG=$tmplang LC_ALL=$tmplang xcin &
fi

Change to


if type -p xsim > /dev/null 2>&1 ; then
export XMODIFIERS=@im=XSIM
xsim &
fi

After the change, run sh.xim, is everything normal?

The default character selection is < >, which is not suitable for our usage habits in Windows. Use - + page turn to refer to the settings of my xsimrc:

PREV_KEY "minus"
NEXT_KEY "equal"
In this file, I can also modify the font. My font is set to
FONT_NAME "-adobe-helvetica-medium-r-*-*-14-*-*-*-*-*-iso8859-1,-misc-simsun-medium-r-*-*-14-*-*-*-*-*-gbk-0"

**************************************************

Problem in installation: I used both the options --with-cn-locale=GBK and --enable-status-kde3 when installing, causing KDE to stop responding when starting xsim, and this is not the case when locale=GB2312. If you encounter this situation, you have to remove the -enable-status-kde3 and recompile and install it.