作者:zerolin , EricNeon
来自: linuxsir.org ; archlinux.org.cn
1、在 /etc/X11/sessions/ 下建立一个custom.desktop文件
内容如下
[Desktop Entry]
Encoding=UTF-8
# The names/descriptions should really be better
Name=Custom Session
Comment=This starts a custom session
Exec=custom
# The "custom" Exec is a very special one and is handled specially in
# the Xsession script and just runs "~/.xsession" directly
Icon=
Type=Application
2、在.xinitrc中设置好变量,例如:
export LANG=zh_CN.UTF-8
export XMODIFIERS=@im=SCIM
export GTK_IM_MODULE=scim
export QT_IM_MODULE=scim
scim -d
exec dbus-launch gnome-session
3、登录的时候选custom session就可以,它会执行.xinitrc里面的内容。
实际上Custom Session是执行.xsession里的内容,确保.xsession里面的内容是arch 默认的
#/bin/bash --login -i ~/.xinitrc
++++++++++++++++++++++++
另一方法 by EricNeon
++++++++++++++++++++++++
我是直接在/etc/profile中加入
export XMODIFIERS=@im=SCIM
export GTK_MODULE=scim
export G_FILENAME_ENCODING=@utf8
export XIM_PROGRAM="scim -d"
export LC_CTYPE="zh_CN.utf8"
scim -d
alias ll='ls -al'
alias nano='nano -w'
然后无论是用startx还是gdm、xdm、kdm都会启用输入法。
评论