美文网首页
如何安装和配置VNC在Ubuntu 16.04

如何安装和配置VNC在Ubuntu 16.04

作者: kentchen2003 | 来源:发表于2019-07-17 08:58 被阅读0次

sudo apt-get update
sudo apt install xfce4 xfce4-goodies tightvncserver
vncserver
vncserver -kill :1
mv ~/.vnc/xstartup ~/.vnc/xstartup.bak
vim ~/.vnc/xstartup

#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 &

sudo chmod +x ~/.vnc/xstartup
vncserver

sudo vim /etc/systemd/system/vncserver@.service

[Unit]
Description=Start TightVNC server at startup
After=syslog.target network.target

[Service]
Type=forking
User=root
PAMName=login
PIDFile=/root/.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 enable vncserver@1.service
vncserver -kill :1
sudo systemctl start vncserver@1
sudo systemctl status vncserver@1

相关文章

网友评论

      本文标题:如何安装和配置VNC在Ubuntu 16.04

      本文链接:https://www.haomeiwen.com/subject/qacflctx.html