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