安装
#autocuftsel 用于vnc两段的复制粘贴
sudo apt-get install autocutsel
安装 vncserver
sudo apt-get install --no-install-recommends vnc4server
安装 gnome2 桌面
sudo apt-get install --no-install-recommends ubuntu-desktop gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal -y
重点:
修改 ~/.vnc/xstartup
vi ~/.vnc/xstartup
#!/bin/sh # Uncomment the following two lines for normal desktop: # unset SESSION_MANAGER # exec /etc/X11/xinit/xinitrc [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources xsetroot -solid grey autocutsel -fork vncconfig -iconic & #x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & #x-window-manager & dbus-launch gnome-panel & dbus-launch gnome-settings-daemon & metacity & nautilus & dbus-launch gnome-terminal &
参考
https://blog.csdn.net/Lasper_csdn/article/details/88552706
https://askubuntu.com/questions/41273/how-to-copy-paste-text-from-remote-system