安装VNC-Server出现xauth: (argv):1: bad display name "[ip address]:1" in "add" command错误

本文介绍了一种常见的VNC连接失败问题及其解决方案。错误表现为xauth命令无法正确识别显示器名称,通过修改/etc/hosts文件并添加正确的主机名,可以有效解决此问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

用百度查这个问题,一页都点进去看了,始终解决不了,上某ge第一条就解决了。看来百度还需要加强呀,就一句话:

 you can set right machine name in etc/hostes such as 127.0.0.1 name_of_machine localhost

错误如下:

  xauth: (argv):1:  bad display name "[ip address]:1" in "add" command

New '[ip address]:1 (root)' desktop is [ip address]:1

Starting applications specified in /root/.vnc/xstartup
        Log file is /root/.vnc/[ip address]:1.log

解决方法如下:

(1)vi /etc/hosts

(2)编辑hosts文件

在文件的第一行中,只有127.0.0.1 localhost,在二者之间添加上述错误中的[ip address],也就是本机名。保存即可。

(3)重新运行vncserver,错误消息不在显示

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值