ubuntu14.04+xfce下启用fcitx,使用中文输入法

时间:2023-03-09 07:59:25
ubuntu14.04+xfce下启用fcitx,使用中文输入法

1. 安装fcitx

   sudo apt-get install fcitx-pinyin

2.启用fcitx

  打开 setting -> Language Support -> Language:

  在 Keyboard input method system 中选择 fcitx

3. 编辑家目录下的.xprofile文件,如没有则创建

  添加以下内容:

 export XMODIFIERS=@im=fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx

4. 编辑家目录下的.xinitrc文件,如没有则创建

  添加以下内容:

 #!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here) if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done
unset f
fi eval `dbus-launch --sh-syntax --exit-with-session`
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS="@im=fcitx" exec startxfce4

5. 重启。