博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
vnc报错 PID file /home/root/.vnc/localhost.pid not readable after start.
阅读量:4101 次
发布时间:2019-05-25

本文共 2134 字,大约阅读时间需要 7 分钟。

报错信息:

查看vnc服务是否开启:

sudo systemctl status vncserver@:1.service -l

[root@localhost ~]# sudo systemctl status vncserver@:1.service -l

vncserver@:1.service - Remote desktop service (VNC)
   Loaded: loaded (/etc/systemd/system/vncserver@:1.service; enabled; vendor preset: disabled)
   Active: failed (Result: resources) since 二 2019-07-09 10:57:10 CST; 41min ago

7月 09 10:57:07 localhost.localdomain systemd[1]: Starting Remote desktop service (VNC)...

7月 09 10:57:10 localhost.localdomain systemd[1]: PID file /home/root/.vnc/localhost.localdomain:1.pid not readable (yet?) after start.
7月 09 10:57:10 localhost.localdomain systemd[1]: Failed to start Remote desktop service (VNC).
7月 09 10:57:10 localhost.localdomain systemd[1]: Unit vncserver@:1.service entered failed state.
7月 09 10:57:10 localhost.localdomain systemd[1]: vncserver@:1.servivice failed.

 

vi  /root/.vnc/xstartup       配置vnc的很多bug,主要就是这个配置文件要修改好

解决方法:

[Service]
#Type=forking
Type=simple

解决了 成功开启服务

[root@localhost ~]# sudo systemctl status vncserver@:1.service -l
 vncserver@:1.service - Remote desktop service (VNC)
   Loaded: loaded (/etc/systemd/system/vncserver@:1.service; enabled; vendor preset: disabled)
   Active: inactive (dead) since 二 2019-07-09 13:06:29 CST; 35s ago
  Process: 3437 ExecStop=/bin/sh -c /usr/bin/vncserver -kill %i > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)
  Process: 3406 ExecStart=/usr/sbin/runuser -l root -c /usr/bin/vncserver %i (code=exited, status=0/SUCCESS)
  Process: 3400 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill %i > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)
 Main PID: 3406 (code=exited, status=0/SUCCESS)

7月 09 13:06:24 localhost.localdomain systemd[1]: Starting Remote desktop service (VNC)...

7月 09 13:06:24 localhost.localdomain systemd[1]: Started Remote desktop service (VNC).
7月 09 13:06:28 localhost.localdomain runuser[3406]: Starting applications specified in /root/.vnc/xstartup
7月 09 13:06:28 localhost.localdomain runuser[3406]: Log file is /root/.vnc/localhost.localdomain:1.log
 

刷新服务 

# systemctl daemon-reload

启动服务 

# systemctl start vncserver@:1.service 

停止vncserver

vncserver -kill :1

启动 VNC Server
vncserver
 

转载地址:http://arzsi.baihongyu.com/

你可能感兴趣的文章
Xshell 4 入门
查看>>
SoapUI-入门
查看>>
Oracle -常用命令
查看>>
JAVA技术简称
查看>>
ORACLE模糊查询优化浅谈
查看>>
2016——个人年度总结
查看>>
2017——新的开始,加油!
查看>>
【Python】学习笔记——-6.2、使用第三方模块
查看>>
【Python】学习笔记——-7.0、面向对象编程
查看>>
【Python】学习笔记——-7.1、类和实例
查看>>
【Python】学习笔记——-7.2、访问限制
查看>>
【Python】学习笔记——-7.3、继承和多态
查看>>
【Python】学习笔记——-7.4、获取对象信息
查看>>
【Python】学习笔记——-7.5、实例属性和类属性
查看>>
破4!《我想进大厂》之Java基础夺命连环16问
查看>>
音视频干货|深入Storyteller:实时协同Tutorial编辑器
查看>>
年轻人不讲武德,竟然重构出这么优雅后台 API 接口
查看>>
这份笔记研究完,进大厂是个“加分项”...
查看>>
写代码有这16个好习惯,可以减少80%非业务的bug
查看>>
《我想进大厂》之Spring夺命连环10问
查看>>