![重启后键盘布局总是恢复为默认设置 - 如何更改?](https://linux22.com/image/840988/%E9%87%8D%E5%90%AF%E5%90%8E%E9%94%AE%E7%9B%98%E5%B8%83%E5%B1%80%E6%80%BB%E6%98%AF%E6%81%A2%E5%A4%8D%E4%B8%BA%E9%BB%98%E8%AE%A4%E8%AE%BE%E7%BD%AE%20-%20%E5%A6%82%E4%BD%95%E6%9B%B4%E6%94%B9%EF%BC%9F.png)
我有 Chromebook Acer C7,我很喜欢它。它速度很快等等。为了在上面安装 *buntu linux,我确实使用了 Crouton。这是一个在 ChromeOS 上安装 *buntu 而不清除原始系统的程序。
无论如何!我对键盘布局有问题。我有瑞典键盘,但系统中的键盘布局是美国键盘。
我可以使用此命令安装瑞典语键盘布局:
sudo dpkg-reconfigure keyboard-configuration
之后,我有了瑞典键盘布局。但重启后,我又回到了美国键盘布局。
(precise)acer@localhost:~$ sudo dpkg-reconfigure keyboard-configuration
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "sv_SV.UTF-8",
LC_ALL = (unset),
LANG = "sv_SV.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_CTYPE to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_MESSAGES to default locale: No such file or directory
/usr/bin/locale: Cannot set LC_ALL to default locale: No such file or directory
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "sv_SV.UTF-8",
LC_ALL = (unset),
LANG = "sv_SV.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Your console font configuration will be updated the next time your system
boots. If you want to update it now, run 'setupcon' from a virtual console.
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "sv_SV.UTF-8",
LC_ALL = (unset),
LANG = "sv_SV.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
update-initramfs: deferring update (trigger activated)
(precise)acer@localhost:~$
这是 /etc/default/keyboard
(precise)acer@localhost:~$ cat /etc/default/keyboard
# Check /usr/share/doc/keyboard-configuration/README.Debian for
# documentation on what to do after having modified this file.
# The following variables describe your keyboard and can have the same
# values as the XkbModel, XkbLayout, XkbVariant and XkbOptions options
# in /etc/X11/xorg.conf.
XKBMODEL=""
XKBLAYOUT="se"
XKBVARIANT=""
XKBOPTIONS="terminate:ctrl_alt_bksp"
# If you don't want to use the XKB layout on the console, you can
# specify an alternative keymap. Make sure it will be accessible
# before /usr is mounted.
# KMAP=/etc/console-setup/defkeymap.kmap.gz
(precise)acer@localhost:~$
这是 /etc/default/locale
(precise)acer@localhost:~$ cat /etc/default/locale
# File generated by update-locale
LANG="sv_SV.UTF-8"
LANGUAGE="sv_SV.UTF-8"
(precise)acer@localhost:~$
谨致问候 Acer
答案1
这是一篇旧帖子,但这是我在 16.04(Xenial)上使用的解决方案
sudo dpkg-reconfigure keyboard-configuration
然后运行:
sudo dpkg-reconfigure console-setup
答案2
- 打开终端
- 使用 root 登录
su
- 输入root密码
- 更新和升级全部
sudo apt-get update && sudo apt-get upgrade
输入以下内容:
apt-get install console-data apt-get install console-setup apt-get install console-locales apt-get install keyboard-configuration
重新启动并重新检查。
- 享受 ;)