1安装包
apt-get update
sudo apt install xfce4 xfce4-goodies tightvncserver
sudo apt-get install vnc4server
sudo apt-get install --no-install-recommends ubuntu-desktop gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal

2 配置
vncpasswd 输入密码
vncserver -kill :1 停止

cd /root/.vnc/
vim xstartup

[-x /etc/vnc/xstartup]&&exec/etc/vnc/xstartup
[-r$HOME/.Xresources]&&xrdb$HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title"$VNCDESKTOPDesktop"&
x-window-manager
gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
vncserver :1

3 打开端口
5801 5901
ufw status

 

参考来源 http://www.jianshu.com/p/9821f88acc0f