需要先设置一下ibus,添加pinyin的输入法
System->Preference->Input Method,勾选“Enable input method feather”,选中“use ibus”打开ibus属性页切换到“input method”页,在“select an input method”下拉菜单,选中“chinese”,选择“Pinyin”,然后点击右边的“Add”按钮添加。
切换到“General”标签页,在keyboard shortcut(快捷键)下,修改Enable or Disable
输入框的快捷键为:Ctrl+Shift+Space,注意点击“Apply”应用生效。 (注意:应区别于本机的输入法快捷键,否则可能会冲突)
导出环境变量:
vi ~/.bash_profile (root账号)
vi /home/av/.bash_profile (其它账号,如av)
添加如下内容:
export XMODIFIERS="@im=ibus"
export GTK_IM_MODULE="ibus"
export QT_IM_MODULE="ibus"
ibus-daemon -d -x
注意:少了 “ibus-daemon -d -x ”这一行,是不行的,务必要添加上。
附:在ssh中vi打开的文档无法输入中文的解决方法
在/etc/profile中加入:
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
更新:source /etc/profile
重连ssh