vnc 连接不上,出现Warning: zhouziqi:1 is taken because of /tmp/.X11-unix/X1

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了vnc 连接不上,出现Warning: zhouziqi:1 is taken because of /tmp/.X11-unix/X1相关的知识,希望对你有一定的参考价值。

楼主不知道怎么回事,突然就边不上VNC了,我就打算重新启动服务,发现服务启不来,我用

journalctl -xe命令出现下面的东西:


Apr 24 21:30:24 zhouziqi runuser[23390]: pam_unix(runuser-l:session): session opened for user root by (uid=0)

Apr 24 21:30:24 zhouziqi runuser[23390]: Warning: zhouziqi:1 is taken because of /tmp/.X11-unix/X1

Apr 24 21:30:24 zhouziqi runuser[23390]: Remove this file if there is no X server zhouziqi:1

Apr 24 21:30:24 zhouziqi runuser[23390]: A VNC server is already running as :1

Apr 24 21:30:24 zhouziqi runuser[23390]: pam_unix(runuser-l:session): session closed for user root

Apr 24 21:30:24 zhouziqi systemd[1]: [email protected]:1.service: control process exited, code=exited status=2

Apr 24 21:30:24 zhouziqi systemd[1]: Failed to start Remote desktop service (VNC).

-- Subject: Unit [email protected]:1.service has failed

-- Defined-By: systemd

-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

-- 

-- Unit [email protected]:1.service has failed.

-- 

-- The result is failed.

Apr 24 21:30:24 zhouziqi systemd[1]: Unit [email protected]:1.service entered failed state.

Apr 24 21:30:24 zhouziqi systemd[1]: [email protected]:1.service failed.

Apr 24 21:30:24 zhouziqi polkitd[832]: Unregistered Authentication Agent for unix-process:23380:8874254 (system bus n


然后我知道可能是

技术分享于是我就把这个文件删除,再重启 发现就好啦

[[email protected] tmp]# rm -rvf .X11-unix

removed ‘.X11-unix/X0’

removed ‘.X11-unix/X1’

removed directory: ‘.X11-unix’

[[email protected] tmp]# systemctl restart [email protected]:1.service

[[email protected] tmp]#

楼主想看看这个文件夹是干嘛的,我就进去看看,原来这个文件夹是里面是一个文件,X1,估计这个文件是你连接的时候产生的,如果你VNC不正常退出的话,这个文件就没有被删除,所以就会出现

A VNC server is already running as :1,这时候你只要手动删除那个文件夹里面的文件就可以重启服务啦

本文出自 “爱周瑜” 博客,请务必保留此出处http://izhouyu.blog.51cto.com/10318932/1918929

以上是关于vnc 连接不上,出现Warning: zhouziqi:1 is taken because of /tmp/.X11-unix/X1的主要内容,如果未能解决你的问题,请参考以下文章

vnc viewer连接黑屏

vnc怎么设置访问地址,怎样连接 ?怎样操作?

VNC客户端一直连接中,但是就是连接不上

vnc连接到服务器后,为啥只显示一个命令行

vnc远程连接问题怎么解决?

ubuntu vnc viewer连接后灰屏,连终端都没有