Installation and use of the Chinese input method CentOS 6.5

The first equipped with the Linux environment in native environment, but can only be found after carrying English input in CentOS 6.5, and then try to install and enable Chinese input method, after tossing doubled realized in the terminal and comes with Firefox support Chinese input method.

Under CentOS install Chinese language pack

I will be here through yum to download the Chinese package command, it is best to ensure that the current environment is a networked state.
1, it is necessary to switch to the root user, enter the command: SU root , and then enter the password.

[wintests@localhost Desktop]$  su root
Password: 
[root@localhost Desktop]# 

It should be noted, the input password is not displayed on the screen (do not think that success is not input), input is complete press Enter.
2, enter the command: yum groupinstall chinese-Support , wait for the download can be installed, there will be prompted to do so after a successful installation. (I have here is the latest version)

[root@localhost Desktop]# yum groupinstall chinese-support
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.cqu.edu.cn
 * updates: mirrors.163.com
Setting up Group Process
Checking for new repos for mirrors
Package cjkuni-uming-fonts-0.2.20080216.1-36.el6.noarch already installed and latest version
Package ibus-table-cangjie-1.2.0.20100210-1.el6.noarch already installed and latest version
Package wqy-zenhei-fonts-0.9.45-3.el6.noarch already installed and latest version
Package ibus-table-erbi-1.2.0.20090901-8.el6.noarch already installed and latest version
Package ibus-table-wubi-1.2.0.20090715-8.el6.noarch already installed and latest version
Package cjkuni-ukai-fonts-0.2.20080216.1-36.el6.noarch already installed and latest version
Package ibus-chewing-1.3.5.20100714-4.el6.x86_64 already installed and latest version
Package ibus-pinyin-1.3.8-1.el6.x86_64 already installed and latest version
Warning: Group chinese-support does not have any packages.
No packages in any requested group available to install or update
[root@localhost Desktop]# 

Under CentOS enable Chinese input method

1, in the upper left corner of the screen to find the System -> Perferences -> Input Method .

2, check the "Enable input method feature", select "Use IBus (recommended)", click on the "input Method Perferences".

3. Select "Input Method", select the language you want to add Chinese, then you can choose Pingyin.

4, restart the virtual machine, and then open a terminal first, then press Ctrl + Space to enable Chinese Pinyin input method, to see whether the success is enabled in the upper right corner of the screen.

In the terminal input Chinese:

In the Firefox browser comes with Chinese input:

Abnormal situations that may arise

1,正常来说,上一步操作后,我们便可以成功使用中文输入法。但可能有部分同学会发现即使多次重启并按下 Ctrl + 空格 后,仍旧不能使用中文输入法,这很可能是因为 缺少输入法候选字显示 有关的库而导致的,解决办法如下:yum install gtk2-immodule-xim。(我这里已经是最新的版本)

[root@localhost Desktop]# yum install gtk2-immodule-xim
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirrors.zju.edu.cn
 * extras: ftp.sjtu.edu.cn
 * updates: ftp.sjtu.edu.cn
Setting up Install Process
Package gtk2-immodule-xim-2.24.23-9.el6.x86_64 already installed and latest version
Nothing to do
[root@localhost Desktop]# 

安装后重启即可启用中文输入法。
2,还有另外一种情况:我们可以在终端上输入中文,但在CentOS 6.5自带的火狐浏览器上却无法输入中文。解决办法如下:
修改用户账户下的配置文件,如我的用户名为test,那么可通过修改 /home/用户名/.bashrc 来解决。输入命令:vi /home/test/.bashrc。在编辑界面,先输入 i 进入编辑模式,再最后面添加这句话:export LC_CTYPE=zh_CN.UTF-8,接着按 Esc 退出编辑模式,最后输入 :wq 保存并退出。

# .bashrc

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

# User specific aliases and functions

export LC_CTYPE=zh_CN.UTF-8

最后重启电脑,即可在火狐浏览器中输入中文。

OK,通过以上步骤,便可以在CentOS 6.5下更方便的输入中文了。

如有错误,欢迎指出!

Guess you like

Origin www.cnblogs.com/wintest/p/11183655.html