___sakura___ 2020-06-14 06:47 采纳率: 0%
浏览 7095

无法重启vncserver 报错Failed to restart vncserver.service: Unit vncserver.service not found.

Ubuntu 5.4.0-6ubuntu1~16.04.5
错误代码
root@xxx:/home/xxx# service vncserver restart
Failed to restart vncserver.service: Unit vncserver.service not found.

补充:vncserver是可以打开新的连接
root@xxx:/home/xxx# vncserver
New 'xxx:2 (root)' desktop is xxx:2
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/xxx:2.log

  • 写回答

1条回答 默认 最新

  • 关竹 2020-06-14 19:24
    关注

    wget -O /lib/systemd/system/vncserver@.service https://github.com/Re4son/vncservice/raw/master/vncserver@.service
    /lib/systemed/system/ 替换为你存放server 文件的路径

    systemctl enable vncserver@1.service && sudo systemctl start vncserver@1.service
    数字1替换为unqid ID,如果你不清楚这个ID是几,就用1

    来源 https://github.com/Re4son/RPi-Tweaks/issues/3

    评论
编辑
预览

报告相同问题?