vnc不正确关闭以后再连接报错了?

运行vncserver

Mon Oct  4 15:53:58 2021
 vncext:      VNC extension running!
 vncext:      Listening for VNC connections on all interface(s), port 5901
 vncext:      created VNC server for screen 0
Killing Xvnc process ID 10361
Failed to open connection to "session" message bus: Failed to connect to socket /tmp/dbus-yRBZzGidkA: Connection refused
Running without a11y support!
Error: cannot open display: :1

网上关于这个错误的解决方案几乎没有

如何解决?

阅读 3.7k
3 个回答

你的账号是root账户吗,或者使用了sudo吗

你可以尝试用ssh之类登录后,重启vncserver来看看。

新手上路,请多包涵

我也遇到过这个问题,在问题发生前我升级了openssh版本,并执行yum -y remove openssh命令卸载了系统的旧版本openssh.
这个卸载命令会把一些gnome依赖包也一同卸载掉。我执行以下命令后就恢复了VNC服务正常启动和访问。
yum -y install gnome*
systemctl restart sshd
systemctl daemon-reload
systemctl start vncserver@:1.service

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题