如何安装和配置VNC在Ubuntu 16.04

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/[email protected]

[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 [email protected]
vncserver -kill :1
sudo systemctl start vncserver@1
sudo systemctl status vncserver@1

你可能感兴趣的:(如何安装和配置VNC在Ubuntu 16.04)