|
发表于 2009-4-20 13:59:11
|
显示全部楼层
我的默认locale是zh_CN.UTF-8
在.profile里加
- if [ "$TERM" = "linux" ]; then
- export LANG=en_US
- fi
复制代码
这样从console登陆是英文
startx前先 export LANG=zh_CN.UTF-8
我是自己写个脚本,可以加参数直接启动不同窗口管理器或者桌面
- #!/bin/bash
- export LANG=zh_CN.UTF-8
- if [ "x$1" = "x" ] ; then
- echo Start X with default session
- exec startx
- fi
- case "$1" in
- xterm|rxvt)
- client="$1"
- ;;
- w|wm|wmaker)
- client="wmaker"
- ;;
- i|ice|icewm)
- client="icewm-session"
- ;;
- o|open|openbox)
- client="openbox"
- ;;
- k|kde|startkde)
- client="startkde"
- ;;
- g|gnome)
- client="gnome-session"
- ;;
- *)
- echo Error: Nothing to do
- exit
- esac
- if [ -n "`which $client`" ]; then
- echo Start X with session $client
- exec startx /etc/X11/xinit/xinitrc $client
- else
- echo Error: $client is not existing
- fi
复制代码 |
|