标签:cst emc har sys config work tar figure configure
主要参考 https://vitux.com/ubuntu-vnc-server/
apt install xfce4 xfce4-goodies -y
apt install -y tightvncserver
su - xxx
vncserver
vncserver -kill :1
cd /etc/systemd/system
vim vncserver@.service
文件内容是:
[Unit] Description=Remote desktop service (VNC) After=syslog.target network.target [Service] Type=forking User=xxx PIDFile=/home/xxx/.vnc/%H:%i.pid ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1 ExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 :%i ExecStop=/usr/bin/vncserver -kill :%i [Install] WantedBy=multi-user.target
改完以后,
sudo systemctl daemon-reload
sudo systemctl start vncserver@1.service
sudo systemctl enable vncserver@1.service
sudo systemctl status vncserver@1.service
域账户启动vncserver失败,转而求助于另一篇文章 https://websiteforstudents.com/install-and-configure-vnc-server-on-ubuntu-16-04-18-04/
vncserver@.service 这部分有差异:
[Service] Type=simple User=richard PAMName=login PIDFile=/home/%u/.vnc/%H%i.pid
但是域账户还是失败。于是改为非域账户。成功。
标签:cst emc har sys config work tar figure configure
原文地址:https://www.cnblogs.com/tangxiaosheng/p/10731691.html