KUbuntu24.04 中文网络名乱码

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
Longhao.Chen
帖子: 23
注册时间: 2022-07-30 22:49
系统: Debian,KUbuntu

KUbuntu24.04 中文网络名乱码

#1

帖子 Longhao.Chen » 2024-08-10 1:45

最近我把系统从22.04升级到了24.04,然后发现(我使用的KDE桌面)之前可以正常显示的中文网络名称出现了乱码:
1.png
当我尝试删除或者修改任意一个网络的时候,会出现报错:
Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

我注意到升级之前网络的配置文件是保存在 /etc/NetworkManager/system-connections/ 中的,升级之后,配置文件被转换和保存在了 /etc/netplan/ 下。尝试卸载 netplan ,但发现NetworkManager竟然依赖于这个包。

请问是否有人遇到过同样的问题以及如何解决的?
头像
astolia
论坛版主
帖子: 6703
注册时间: 2008-09-18 13:11

Re: KUbuntu24.04 中文网络名乱码

#2

帖子 astolia » 2024-08-10 11:28

不是乱码,是用8进制表示的utf-8字节码

代码: 全选

$ echo $'\346\226\260\345\273\272'
新建
大概是升级时将NetworkManager配置转换成netplan配置时,将中文用8进制编码表示了,但NetworkManager又不认这种写法,就这样显示出来了。你进配置将名字改回去就行了
Longhao.Chen
帖子: 23
注册时间: 2022-07-30 22:49
系统: Debian,KUbuntu

Re: KUbuntu24.04 中文网络名乱码

#3

帖子 Longhao.Chen » 2024-08-10 15:29

我刚刚去配置文件里面把一个网络名称改成了中文,然后运行sudo netplan apply
结果显示的还是8进制表示的utf-8字节码
头像
astolia
论坛版主
帖子: 6703
注册时间: 2008-09-18 13:11

Re: KUbuntu24.04 中文网络名乱码

#4

帖子 astolia » 2024-08-10 19:54

Longhao.Chen 写了: 2024-08-10 15:29 我刚刚去配置文件里面把一个网络名称改成了中文,然后运行sudo netplan apply
你思路有问题。既然你想改networkmanager的显示,那么就用networkmanager的配置方式。直接点你一楼图上右边的下箭头再选编辑配置,在那里面改就行了。
Longhao.Chen
帖子: 23
注册时间: 2022-07-30 22:49
系统: Debian,KUbuntu

Re: KUbuntu24.04 中文网络名乱码

#5

帖子 Longhao.Chen » 2024-08-10 20:35

这样会卡半天然后出现报错
Longhao.Chen 写了: 2024-08-10 1:45 当我尝试删除或者修改任意一个网络的时候,会出现报错:
Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
修改似乎会被执行(我添加的字仍然会被加进去),但中文仍然无法正常显示


我安装了一个虚拟机,在/etc/netplan配置文件一样的情况下可以正常显示中文,应该不是配置文件的问题
头像
astolia
论坛版主
帖子: 6703
注册时间: 2008-09-18 13:11

Re: KUbuntu24.04 中文网络名乱码

#6

帖子 astolia » 2024-08-10 21:00

Longhao.Chen 写了: 2024-08-10 1:45 当我尝试删除或者修改任意一个网络的时候,会出现报错:
Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
这说明你的系统上NetworkManager的后台服务已经有问题了。用journalctl和systemctl去看看到底是什么错误
回复