系统更新后键盘坏了!我无法添加键盘布局!“添加”按钮被禁用了!
我怎样才能恢复系统?
$ cat /etc/default/keyboard
# KEYBOARD CONFIGURATION FILE
# Consult the keyboard(5) manual page.
XKBMODEL="pc105"
XKBLAYOUT="us"
XKBVARIANT=""
XKBOPTIONS=""
BACKSPACE="guess"
$ apt-cache policy mate-control-center
mate-control-center:
Installed: 1.20.2-2ubuntu1
Candidate: 1.20.2-2ubuntu1
Version table:
*** 1.20.2-2ubuntu1 500
500 http://ru.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
100 /var/lib/dpkg/status
答案1
您必须/etc/default/keyboard
使用以下单个长命令更改为正确的值:
cat <<EOF | sudo tee /etc/default/keyboard
# KEYBOARD CONFIGURATION FILE
# Consult the keyboard(5) manual page.
XKBMODEL="pc105"
XKBLAYOUT="us,ru"
XKBVARIANT=","
XKBOPTIONS="grp:alt_shift_toggle"
BACKSPACE="guess"
EOF
然后运行sudo dpkg-reconfigure keyboard-configuration
,然后您可以从键盘偏好设置(mate-keyboard-properties
)中设置键盘布局。