gnome-terminal doesn't work maybe because of locale setting

老子叫甜甜 提交于 2019-12-05 14:09:25

I had the same problem some time ago. I fixed my locale config running this command

sudo localedef -f UTF-8 -i en_US en_US.UTF-8

The meaning of status code 8 is documented on gnome's website here:

The environment that gnome-terminal-server is started with does not correctly set the locale to a UTF-8 locale. Consult your distribution's documentation on how to fix this. Note that is it not relevant to check the locale settings from a different terminal (e.g. xterm); what counts is the environment that the session dbus-daemon passes to the processes it starts.

So you're right, this is probably due to locale settings. I don't quite understand all the details, but if I set ~/.xinitrc to exec gnome-session and then run startx, I get a similar error to yours.

However, if instead of running startx, I start the gdm display manager (via systemctl start gdm.service on Arch), I can spawn a gnome-terminal correctly. So if you're okay with using gdm, that may be a solution. Lightdm also works, though SLiM doesn't (from my experience).

In the past, I also had to install the vte3 package for gnome-terminal to work, so make sure that's installed as well. And FWIW, sudo gnome-terminal seems to always work.

Did you think to regenerate your locales after you had edited your /etc/locale.gen file ?

locale-gen

I think in your explanation you mixed the /etc/locale.gen and the /etc/locale.conf files. Be sure you edited the correct file with the correct values.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!