装机
sudo免密码
visudo
最后一行添加
| chun ALL=(ALL) NOPASSWD:ALL
|
中文
| apt install language-pack-zh-hant language-pack-zh-hans
apt install -y --force-yes --no-install-recommends fonts-wqy-microhei
apt install -y --force-yes --no-install-recommends ttf-wqy-zenhei
locale-gen
|
fcitx&rime输入法
| apt install fcitx fonts-noto-cjk fonts-noto-color-emoji dbus-x11 fcitx-rime
fcitx >/dev/null 2>&1 # 启动fcitx
fcitx-config-gtk3 # 配置
|
默认简体中文,~/.config/fcitx/rime:
| switches:
- name: ascii_mode
reset: 0
states: [ 中文, 西文 ]
- name: full_shape
states: [ 半角, 全角 ]
- name: simplification
reset: 1
states: [ 漢字, 汉字 ]
- name: ascii_punct
states: [ 。,, ., ]
|
WSL
dbus生成ID
| sudo systemd-machine-id-setup
|
/usr/share/fcitx/dbus/daemon.conf 找不到找/etc/dbus-1/
| <listen>tcp:host=localhost,port=0</listen>
<auth>ANONYMOUS</auth>
<allow_anonymous/>
|
.bashrc:
| if [[ $OS =~ "wsl" ]]; then
if [[ ! "$(ps -ef |grep fcitx)" =~\
"/usr/bin/fcitx" ]]
then
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export DefaultIMModule=fcitx
fcitx-autostart>/var/log/fcitx/fcitx.log 2>&1
fi
fi
|
推荐配合autohotkey,屏蔽热键
| #IfWinActive, ahk_exe vcxsrv.exe
^Space::
ControlSend, , ^{Space}
Return
^!::
ControlSend, , ^!
Return
|