拱门上的奇怪的现场问题

时间:2015-01-31 02:08:36

标签: linux locale archlinux gnome-terminal

最近我的gnome-terminal停止了工作。使用xterm启动后,我看到了以下内容:

(process:3975): Gtk-WARNING **: Locale not supported by C library.
    Using the fallback 'C' locale.
Error constructing proxy for org.gnome.Terminal:/org/gnome/Terminal/Factory0: Error calling StartServiceByName for org.gnome.Terminal: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ChildExited: Process org.gnome.Terminal exited with status 8

它似乎与我的语言环境有关,如下所示:

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
LANG=en_GB.utf8
LC_CTYPE="en_GB.utf8"
LC_NUMERIC="en_GB.utf8"
LC_TIME="en_GB.utf8"
LC_COLLATE="en_GB.utf8"
LC_MONETARY="en_GB.utf8"
LC_MESSAGES="en_GB.utf8"
LC_PAPER="en_GB.utf8"
LC_NAME="en_GB.utf8"
LC_ADDRESS="en_GB.utf8"
LC_TELEPHONE="en_GB.utf8"
LC_MEASUREMENT="en_GB.utf8"
LC_IDENTIFICATION="en_GB.utf8"
LC_ALL=

我的locale -a看起来像这样:

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_COLLATE to default locale: No such file or directory
C
POSIX
en_US.utf8
fr_CA.utf8
pl_PL.utf8

我真的不确定en_GB.utf8在locale输出中的来源。

我尝试过locale-gen,正如关于类似问题的帖子中所建议的那样,但这并没有解决问题。我该如何修理?这台计算机上的其他帐户没有这个问题,只有我的。我不记得曾经做过任何可能造成这种情况的事情。

1 个答案:

答案 0 :(得分:13)

有两种方法可以解决问题。

  1. 生成缺少的区域设置。打开/etc/locale.gen并取消注释缺少区域设置的行(en_GB.utf8)。然后以root身份运行locale-gen
  2. 查找语言环境设置为错误值的位置。试试grep LANG ~/.*profile ~/.bashrc ~/.pam_environment ~/.xinitrc。用错误的导出命令注释该行。
  3. 可以肯定的是,应用了更改,重新登录或重新启动。