Ubuntu命令行shell显示中文异常

系统字体配置、中文显示和输入法问题
liuzhaoyzz
帖子: 9
注册时间: 2021-02-01 20:13
系统: WIN10

Ubuntu命令行shell显示中文异常

#1

帖子 liuzhaoyzz » 2022-10-25 21:31

Ubuntu命令行shell显示中文
Ubuntu命令行shell显示中文-iibull-ChinaUnix博客 http://blog.chinaunix.net/uid-27875-id-5860203.html
我按照上面的教程,设置了下,结果ubuntu shell显示中文还是乱码,请问下该怎么办?我没有安装Xwinodw
sudo nano /etc/apt/sources.list
Ubuntu64 位-2022-10-25-21-29-00.png
上次由 liuzhaoyzz 在 2022-10-26 23:00,总共编辑 1 次。
头像
astolia
论坛版主
帖子: 6454
注册时间: 2008-09-18 13:11

Re: Ubuntu命令行shell显示中文异常

#2

帖子 astolia » 2022-10-26 9:32

你的运行环境到底是什么?实机安装?虚拟机安装?ssh远程连接?wsl?wsl2?
你的图也没传上来,去读一下置顶帖
头像
daf3707
论坛版主
帖子: 12731
注册时间: 2007-06-13 15:57
来自: 在他乡

Re: Ubuntu命令行shell显示中文异常

#3

帖子 daf3707 » 2022-10-26 9:51

是不是要在tty下显示中文,可以搜索 fbterm,比如这里
https://fooyou.github.io/document/2015/ ... n-tty.html
liuzhaoyzz
帖子: 9
注册时间: 2021-02-01 20:13
系统: WIN10

Re: Ubuntu命令行shell显示中文异常

#4

帖子 liuzhaoyzz » 2022-10-26 17:38

astolia 写了: 2022-10-26 9:32 你的运行环境到底是什么?实机安装?虚拟机安装?ssh远程连接?wsl?wsl2?
你的图也没传上来,去读一下置顶帖
我是在虚拟机安装的ubuntu22,不是WSL WSL2,ssh远程连接可以正常显示中文,但是在虚拟机中不能显示中文。
我的图我上传了,很奇怪为啥看不到。
liuzhaoyzz
帖子: 9
注册时间: 2021-02-01 20:13
系统: WIN10

Re: Ubuntu命令行shell显示中文异常

#5

帖子 liuzhaoyzz » 2022-10-26 17:41

daf3707 写了: 2022-10-26 9:51 是不是要在tty下显示中文,可以搜索 fbterm,比如这里
https://fooyou.github.io/document/2015/ ... n-tty.html
你这个帖子,好像说的是在桌面下的显示?我现在没有安装xwindow,可能不一样吧?

晚点我上传乱码的截图。
Ubuntu64 位-2022-10-25-21-29-00.png
头像
daf3707
论坛版主
帖子: 12731
注册时间: 2007-06-13 15:57
来自: 在他乡

Re: Ubuntu命令行shell显示中文异常

#6

帖子 daf3707 » 2022-10-27 10:44

不是桌面下,是tty终端显示及输入中文,你再看看帖子
liuzhaoyzz
帖子: 9
注册时间: 2021-02-01 20:13
系统: WIN10

Re: Ubuntu命令行shell显示中文异常

#7

帖子 liuzhaoyzz » 2022-10-27 11:15

daf3707 写了: 2022-10-27 10:44 不是桌面下,是tty终端显示及输入中文,你再看看帖子
您说的这个fbterm,我在VPS里面的ubuntu上面试了下,好像是基于xwindow的啊?
作为tty下面中文显示方案,这个fbterm感觉太重了,依赖库暴多。

Configuration file '/etc/cloud/cloud.cfg'
我不知道怎么配置,取了默认值。

sudo chmod u+s /usr/bin/fbterm
chmod: cannot access '/usr/bin/fbterm': No such file or directory
失败了。

sudo setcap 'cap_sys_tty_config+ep' /usr/bin/fbterm
Failed to set capabilities on file `/usr/bin/fbterm' (No such file or directory)
The value of the capability argument is not permitted for a file. Or the file is not a regular (non-symlink) file
失败了。

fcitx-fbterm-helper
Your display number is localhost10
Test whether fcitx is running correctly with dbus...
Cannot communicate fcitx with DBus.

=========================================================
=========================================================
Fcitx is not running, you may setup it mannually
The easiest way is set $DISPLAY, start fcitx from X
Then try this helper
=========================================================
你看上面最后的提示,还是提示需要依赖于xwindow,dbus这些。
附件
fbterm安装日志.txt
(315.42 KiB) 已下载 42 次
头像