开机后发现VNC服务没有启启来,提示我们使用journalctl -xn查看错误信息,提示信息如下:
Sep :: localhost.localdomain systemd[]: Unit vncserver@:.service entered failed state.
Sep :: localhost.localdomain systemd[]: Faild to mark scope session-c4.scope as abandoned: Stale file handle
Sep :: localhost.localdomain sudo[]: Mesogene : TTY =pts/ ; PWD=/home/Mesogene/Desktop ; USER=root ; COMMAND=/bin/journalctl -xn
解决方案如下:
删除/tmp/.X11-unix/X5 文件,然后重启VNC服务解决问题。
附图:
参考:https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-remote-access-for-the-gnome-desktop-on-centos-7