重启后键盘布局总是恢复为默认设置 - 如何更改?

重启后键盘布局总是恢复为默认设置 - 如何更改?

我有 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

  1. 打开终端
  2. 使用 root 登录su
  3. 输入root密码
  4. 更新和升级全部sudo apt-get update && sudo apt-get upgrade
  5. 输入以下内容:

    apt-get install console-data
    apt-get install console-setup
    apt-get install console-locales
    apt-get install keyboard-configuration
    
  6. 重新启动并重新检查。

  7. 享受 ;)

相关内容