报错信息:

查看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

vnc报错 PID file /home/root/.vnc/localhost.pid not readable after start.相关推荐

  1. vnc报错 font catalog is not properly configured

    启动vnc报错: starting vnc server : WARNING: the first attempt to star Xvnc failed,possibly because the f ...

  2. 解决执行Mysql报错: ERROR: The server quit without updating PID file (/data/xxx.pid)

    昨天在Linux中安装mysql-8.0.28时遇到了这个报错: ERROR! The server quit without updating PID file (/data/xxx.pid) 其实 ...

  3. mysql 启动报错 ERROR The server quit without updating PID file

    mysql 启动报错 : ERROR! The server quit without updating PID file (/usr/local/var/mysql/bogon.pid). 今天莫名 ...

  4. ubuntu makefile交叉编译报错:file not recognized: file format not recognized

    在linux ubuntu上编译netkit-ftp的时候报错:file not recognized: file format not recognized [root@ubuntu /arnold ...

  5. 【总结】ElasticSearch 安装启动报错max file descriptors [32768] for elasticsearch process is too low, increase

    ElasticSearch 安装启动报错max file descriptors [32768] for elasticsearch process is too low, increase to a ...

  6. centos 7.2执行yum -y install报错Metadata file does not match checksum

    分析结论 1,Metadata file does not match checksum报错在于元文件的校验值与元文件不匹配 2,元数据是指 mnt/repodata/436345f4b666f0a4 ...

  7. adb push报错‘read-only file system‘

    使用bat脚本,执行对android设备文件的覆盖 @echo off adb root adb push hosts /etc/ pause adb已经获取到root权限,当尝试替换/etc/hos ...

  8. Linux下启动启动tomcat 服务器报错 The file is absent or does not have execute permission

    为什么80%的码农都做不了架构师?>>>    Linux下启动启动tomcat 服务器报错 The file is absent or does not have execute ...

  9. ionic ios查看大图报错 the file to show is not valid image,or could not be loaded

    ionic ios查看大图报错 the file to show is not valid image,or could not be loaded 解决代码如下 public showImage(u ...

最新文章

  1. 2017-2018 ACM-ICPC, NEERC, Southern Subregional Contest
  2. CentOS 7 SSH 免密登录的方法
  3. 视频演示:高颜值免费在线绘图ImageGP
  4. 【CV中的注意力机制】史上最强ResNet变体--ResNeSt
  5. java怎么构造map_Java中Map结构
  6. osgi架构与linux_OSGi:进入微服务架构的门户
  7. java如何模拟请求_单元测试如何模拟用户请求
  8. python 定时器_按键精灵定时器介绍和使用,不会的小伙伴速速看看精辟
  9. javascript学习笔记(十五) 间歇调用和超时调用
  10. scala学习--难点
  11. Intellij IDEA|phpstorm 相关收藏
  12. 分布式系统的Raft算法 1
  13. fgui快速接入到一个laya实例项目中
  14. ios游戏开发 Sprite Kit教程:初学者 3
  15. 关于微信刷票的Python源码
  16. 三维空间无人机均匀分布——球体包围
  17. 实时数仓实践(一)之数据库实时增量同步工具-CDC(Change Data Capture)
  18. 最近比较火的palywright了解一下?
  19. 在线使用ChatGPT,国内手机号也可以注册。
  20. 第一篇 AlexNet——论文翻译

热门文章

  1. 高通820(msm8996)camera hal源码分析
  2. 关于NetCore+饿了么开放平台+奇门+聚石塔对接的解释说明
  3. 数据库设计、查询规范及常用SQL语句
  4. 微信扫描自定义二维码关注公众号并登录
  5. 代码对比工具(beyondCompare/Winmerge/Meld)
  6. 英雄的黎明-纯音乐-横山菁儿
  7. excel批量制作条形码_如何在Microsoft Excel中制作条形图
  8. php生成其他网页截图,php实现网页截图
  9. 加盟汉庭酒店,后疫情时代稳健的投资方式
  10. mxgraph.js实现Topo图